Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] erniewyles@hotmail.com is offline
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] erniewyles@hotmail.com is offline
external usenet poster
 
Posts: 18
Default 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?



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default supress characters of a bookmark

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?



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] erniewyles@hotmail.com is offline
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] erniewyles@hotmail.com is offline
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Supress blank Printdate Peter Karlström Microsoft Word Help 1 March 15th 07 03:52 PM
My noteref to valid bookmark says "Error! Bookmark not defined."? jchilders_98 Microsoft Word Help 3 October 5th 06 02:23 PM
The Insert Bookmark box shouldnt vanish after adding a bookmark. RogerKni Microsoft Word Help 4 September 26th 06 03:13 PM
Supress blank lines Jan Mailmerge 5 March 6th 06 03:52 PM
Supress toolbars GKW in GA Microsoft Word Help 5 September 19th 05 03:22 AM


All times are GMT +1. The time now is 04:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"