Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
is there a way to show only certain characters of a bookmark, i.e., only
displaying the first character of a bookmark, or say, the last character of a bookmark? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
Hi ernie,
Theoretically, yes, but practically, no. That's because there's no way to simply retrieve a character from a field. The field coding to do this is extensive, potentially involving over 200 IF tests, because you have to test for each possible character individually. For example to test for the letter 'a' as the first letter in the bookmark, you need a field coded as: {IF{REF MyBookmark}= "a*" "a"} To test for 'a' as the last character: {IF{REF MyBookmark}= "*a" "a"} In each case, repeat for every other possible character. Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... is there a way to show only certain characters of a bookmark, i.e., only displaying the first character of a bookmark, or say, the last character of a bookmark? |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
this is what i'm trying to do here exactly....i have a numerical value that
comes from a database, it represents a persons height. I want to format that value with 'ft.' after the first number and 'in.' after tha last digit. Sometimes the output will be 2 numbers i.e. 59 -- representing 5 ft 9 in. or 511 -- representing 5 ft 11 in. Is this possible? "macropod" wrote: Hi ernie, Theoretically, yes, but practically, no. That's because there's no way to simply retrieve a character from a field. The field coding to do this is extensive, potentially involving over 200 IF tests, because you have to test for each possible character individually. For example to test for the letter 'a' as the first letter in the bookmark, you need a field coded as: {IF{REF MyBookmark}= "a*" "a"} To test for 'a' as the last character: {IF{REF MyBookmark}= "*a" "a"} In each case, repeat for every other possible character. Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... is there a way to show only certain characters of a bookmark, i.e., only displaying the first character of a bookmark, or say, the last character of a bookmark? |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
Hi Ernie,
In that case you could simply do some math on the bookmarked value: {QUOTE "{=INT({BkMrk}/{IF{BkMrk} 99 100 10}) \# 0ft}, {=MOD({BkMrk}, {IF{BkMrk} 99 100 10}) \# 0in}"} where 'BkMrk' is the bookmark name. Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... this is what i'm trying to do here exactly....i have a numerical value that comes from a database, it represents a persons height. I want to format that value with 'ft.' after the first number and 'in.' after tha last digit. Sometimes the output will be 2 numbers i.e. 59 -- representing 5 ft 9 in. or 511 -- representing 5 ft 11 in. Is this possible? "macropod" wrote: Hi ernie, Theoretically, yes, but practically, no. That's because there's no way to simply retrieve a character from a field. The field coding to do this is extensive, potentially involving over 200 IF tests, because you have to test for each possible character individually. For example to test for the letter 'a' as the first letter in the bookmark, you need a field coded as: {IF{REF MyBookmark}= "a*" "a"} To test for 'a' as the last character: {IF{REF MyBookmark}= "*a" "a"} In each case, repeat for every other possible character. Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... is there a way to show only certain characters of a bookmark, i.e., only displaying the first character of a bookmark, or say, the last character of a bookmark? |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
Oh My GOD!!!! That totally worked! Genius, man! Thank you tremendously!!!!
"macropod" wrote: Hi Ernie, In that case you could simply do some math on the bookmarked value: {QUOTE "{=INT({BkMrk}/{IF{BkMrk} 99 100 10}) \# 0ft}, {=MOD({BkMrk}, {IF{BkMrk} 99 100 10}) \# 0in}"} where 'BkMrk' is the bookmark name. Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... this is what i'm trying to do here exactly....i have a numerical value that comes from a database, it represents a persons height. I want to format that value with 'ft.' after the first number and 'in.' after tha last digit. Sometimes the output will be 2 numbers i.e. 59 -- representing 5 ft 9 in. or 511 -- representing 5 ft 11 in. Is this possible? "macropod" wrote: Hi ernie, Theoretically, yes, but practically, no. That's because there's no way to simply retrieve a character from a field. The field coding to do this is extensive, potentially involving over 200 IF tests, because you have to test for each possible character individually. For example to test for the letter 'a' as the first letter in the bookmark, you need a field coded as: {IF{REF MyBookmark}= "a*" "a"} To test for 'a' as the last character: {IF{REF MyBookmark}= "*a" "a"} In each case, repeat for every other possible character. Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... is there a way to show only certain characters of a bookmark, i.e., only displaying the first character of a bookmark, or say, the last character of a bookmark? |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
This solution also worked for me. Actually, it handled the variance of
either a two character or three character height result just fine. All without the use of further bookmarks, only references. Incredible. Simply incredible. Thank you very much as well. "Graham Mayor" wrote: Possible but more complicated - { IF { REF MyBookmark } 100 "{ =INT({ REF MyBookmark } /10) }ft { =MOD({ Ref MyBookmark },10) }in" "{ =INT({ REF MyBookmark } /100) }ft { =MOD({ Ref MyBookmark },100) }in" } -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org wrote: this is what i'm trying to do here exactly....i have a numerical value that comes from a database, it represents a persons height. I want to format that value with 'ft.' after the first number and 'in.' after tha last digit. Sometimes the output will be 2 numbers i.e. 59 -- representing 5 ft 9 in. or 511 -- representing 5 ft 11 in. Is this possible? "macropod" wrote: Hi ernie, Theoretically, yes, but practically, no. That's because there's no way to simply retrieve a character from a field. The field coding to do this is extensive, potentially involving over 200 IF tests, because you have to test for each possible character individually. For example to test for the letter 'a' as the first letter in the bookmark, you need a field coded as: {IF{REF MyBookmark}= "a*" "a"} To test for 'a' as the last character: {IF{REF MyBookmark}= "*a" "a"} In each case, repeat for every other possible character. Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... is there a way to show only certain characters of a bookmark, i.e., only displaying the first character of a bookmark, or say, the last character of a bookmark? |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
Hi Ernie,
An even shorter (and simpler) version is: {QUOTE "{SET Div {=10+(BkMrk99) *90}}{=INT(BkMrk/Div) \# 0ft}, {=MOD(BkMrk,Div) \# 0in}"} -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... Oh My GOD!!!! That totally worked! Genius, man! Thank you tremendously!!!! "macropod" wrote: Hi Ernie, In that case you could simply do some math on the bookmarked value: {QUOTE "{=INT({BkMrk}/{IF{BkMrk} 99 100 10}) \# 0ft}, {=MOD({BkMrk}, {IF{BkMrk} 99 100 10}) \# 0in}"} where 'BkMrk' is the bookmark name. Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... this is what i'm trying to do here exactly....i have a numerical value that comes from a database, it represents a persons height. I want to format that value with 'ft.' after the first number and 'in.' after tha last digit. Sometimes the output will be 2 numbers i.e. 59 -- representing 5 ft 9 in. or 511 -- representing 5 ft 11 in. Is this possible? "macropod" wrote: Hi ernie, Theoretically, yes, but practically, no. That's because there's no way to simply retrieve a character from a field. The field coding to do this is extensive, potentially involving over 200 IF tests, because you have to test for each possible character individually. For example to test for the letter 'a' as the first letter in the bookmark, you need a field coded as: {IF{REF MyBookmark}= "a*" "a"} To test for 'a' as the last character: {IF{REF MyBookmark}= "*a" "a"} In each case, repeat for every other possible character. Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... is there a way to show only certain characters of a bookmark, i.e., only displaying the first character of a bookmark, or say, the last character of a bookmark? |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
supress characters of a bookmark
Now stop showing off
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org macropod wrote: Hi Ernie, An even shorter (and simpler) version is: {QUOTE "{SET Div {=10+(BkMrk99) *90}}{=INT(BkMrk/Div) \# 0ft}, {=MOD(BkMrk,Div) \# 0in}"} " wrote in message ... Oh My GOD!!!! That totally worked! Genius, man! Thank you tremendously!!!! "macropod" wrote: Hi Ernie, In that case you could simply do some math on the bookmarked value: {QUOTE "{=INT({BkMrk}/{IF{BkMrk} 99 100 10}) \# 0ft}, {=MOD({BkMrk}, {IF{BkMrk} 99 100 10}) \# 0in}"} where 'BkMrk' is the bookmark name. Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... this is what i'm trying to do here exactly....i have a numerical value that comes from a database, it represents a persons height. I want to format that value with 'ft.' after the first number and 'in.' after tha last digit. Sometimes the output will be 2 numbers i.e. 59 -- representing 5 ft 9 in. or 511 -- representing 5 ft 11 in. Is this possible? "macropod" wrote: Hi ernie, Theoretically, yes, but practically, no. That's because there's no way to simply retrieve a character from a field. The field coding to do this is extensive, potentially involving over 200 IF tests, because you have to test for each possible character individually. For example to test for the letter 'a' as the first letter in the bookmark, you need a field coded as: {IF{REF MyBookmark}= "a*" "a"} To test for 'a' as the last character: {IF{REF MyBookmark}= "*a" "a"} In each case, repeat for every other possible character. Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. -- Cheers macropod [Microsoft MVP - Word] " wrote in message ... is there a way to show only certain characters of a bookmark, i.e., only displaying the first character of a bookmark, or say, the last character of a bookmark? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Supress blank Printdate | Microsoft Word Help | |||
My noteref to valid bookmark says "Error! Bookmark not defined."? | Microsoft Word Help | |||
The Insert Bookmark box shouldnt vanish after adding a bookmark. | Microsoft Word Help | |||
Supress blank lines | Mailmerge | |||
Supress toolbars | Microsoft Word Help |