Field Code NumWords and Bookmark (Word 2000)

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15621
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Field Code NumWords and Bookmark (Word 2000)

Post by ChrisGreaves »

I really wanted to insert a field code in my index document such that the field code would return the number of words from another document. Thirteen articles for publication, and me keeping track of the length of each, whittling down the longest.

I haven't found such a field code, yet.

In the meantime I experimented by creating a bookmark [ValueNumberWords] in a slave document, where the bookmark is the FieldCode {NumWords}. The field code in the slave document correctly reports 28 words.

Back in the index document I create a hyperlink to the slave document, nominating the bookmark [ValueNumberWords] in the slave document and am told "15 words".
15 words is suspiciously close to the number of words in the index document, as in File, Properties, Statistics.

I have been zealous in my use of updating fields - Ctrl-A; F9 is second-nature to me now.
2.PNG
I would dearly love to be able to insert the value of a bookmarked link from another document, and/but am mightily puzzled over my current results, and would appreciate any light that can be shone.

I have attached a small zip file containing two documents which will, I hope, demonstrate this apparent aberrant behaviour.

P.S. Word 2000.
P.P.S. I am doubly mystified, having carefully chosen a bookmark name that is, I think, not a reserved word in Word 2000.
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Field Code NumWords and Bookmark (Word 2000)

Post by HansV »

The INCLUDETEXT field makes the inserted document or text behave as if it is part of the current document. If the inserted text contains fields, they will be evaluated in the current document. Hence you get the number of words in the current document. In most situations where you use INCLUDETEXT to assemble a document, that is exactly the behavior that you want.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15621
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Field Code NumWords and Bookmark (Word 2000)

Post by ChrisGreaves »

HansV wrote:The INCLUDETEXT field makes the inserted document or text behave as if it is part of the current document.
Thanks, Hans, and this all makes sense.
FWIW I essayed with a Paste, Link, whose results do not (now!) surprise me:
3.PNG
Paste, Link as unformatted text seems to give me the results I want:
4.PNG
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Field Code NumWords and Bookmark (Word 2000)

Post by macropod »

Hi Chris,

The INCLUDETEXT field would return the expected results with the \! switch.
Paul Edstein
[Fmr MS MVP - Word]

User avatar
Leif
Administrator
Posts: 7209
Joined: 15 Jan 2010, 22:52
Location: Middle of England

Re: Field Code NumWords and Bookmark (Word 2000)

Post by Leif »

Hi Paul - welcome to Eileen's Lounge!
Leif

User avatar
Claude
cheese lizard
Posts: 6241
Joined: 16 Jan 2010, 00:14
Location: Sydney Australia

Re: Field Code NumWords and Bookmark (Word 2000)

Post by Claude »

Hi Paul, glad you found us !
Cheers, Claude.

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Field Code NumWords and Bookmark (Word 2000)

Post by macropod »

Hi Claude,

I didn't know you were lost!
Paul Edstein
[Fmr MS MVP - Word]

User avatar
Claude
cheese lizard
Posts: 6241
Joined: 16 Jan 2010, 00:14
Location: Sydney Australia

Re: Field Code NumWords and Bookmark (Word 2000)

Post by Claude »

I've been loster than you could ever imagine :evilgrin:
Cheers, Claude.

User avatar
HansV
Administrator
Posts: 78488
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Field Code NumWords and Bookmark (Word 2000)

Post by HansV »

Hi macropod, good to see you here! Welcome to Eileen's Lounge!
Best wishes,
Hans