View Single Post
 
Old 08-24-2011, 12:18 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi HopeHare,

If you're trying to import the page number count from the 'Chap1' document, you need to create a bookmark in that document containing a NUMPAGES field. For example, you could put a field coded as follows in the document header or footer:
{SET PageCount {NUMPAGES}}
You most definitely do not want a field that includes text in the output (eg your 'Test 1').

Then, in the target document, use a field coded as:
{={PAGE}+{INCLUDETEXT "N:\\BPH Staff Folders\\HHare\\Numbering\\Chap1.doc" PageCount}}
or, if you want proper support for relative paths to files in the same folder:
{={PAGE}+{INCLUDETEXT "{FILENAME \p}/../Chap1.doc" PageCount}}

Notes:
1. The field brace pairs (ie '{ }') for the above sare created via Ctrl-F9 - you can't simply type them or copy & paste them from this message;
2. You don't need any spaces between the forumla operators;
3. the \! switch is only useful if you want to prevent the source document updating its last-updated page count;
4. the Charformat switch doesn't do anything useful in this context; and
5. If you're combining the page counts from multiple documents, each source document can use the same bookmark name. This makes things a bit simpler, so that you can use a compound field coded along the lines of:
{={PAGE}+{INCLUDETEXT "{FILENAME \p}/../Chap1.doc" PageCount}+{INCLUDETEXT "{FILENAME \p}/../Chap2.doc" PageCount}}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote