Automate Page Numbering When Combining Documents

  • Thread starter Thread starter Derek Hart
  • Start date Start date
D

Derek Hart

I am combining documents that have consistent styles, but the page numbering
does not seem to work properly. I think there may not be a solution. When
using the fields Pages or SectionPages in Word, these refer to the document
count of pages, or the section count of pages, respectively. But the
documents I am combining sometimes have multiple sections within them, and
then when the documents are combined, the Pages field seems to want to
represent the number of pages for the entire combined document. Now I have
worked with the Start At option to start the numbering at 1, and this has
worked a bit, but doing this in VBA automation does not work at all. Any
ideas if this is an impossibility? Is there some other field to use in
Word, maybe some kind of custom field.

Derek
 
Hi Derek

Derek said:
I am combining documents that have consistent styles, but the page numbering
does not seem to work properly. I think there may not be a solution. When
using the fields Pages or SectionPages in Word, these refer to the document
count of pages, or the section count of pages, respectively. But the
documents I am combining sometimes have multiple sections within them, and
then when the documents are combined, the Pages field seems to want to
represent the number of pages for the entire combined document. Now I have
worked with the Start At option to start the numbering at 1, and this has
worked a bit, but doing this in VBA automation does not work at all.

Why not, or rather: what exactly is your code doing, and how does it
fail? I wouldn't know the relevant code myself, but I'm sure you can
loop through a sections collection and set each section to start
numbering at "1" *if that's what you really want*!

Any
ideas if this is an impossibility? Is there some other field to use in
Word, maybe some kind of custom field.

PAGES, SECTIONPAGES, NUMPAGES are about all there is. If you want to
display anything else, you have to calculate it yourself (i.e., adding a
PAGEREF from a bookmark on a given page to a PAGE field). But note that
a TOC, INDEX, etc. will always reflect the exact same thing as an
ordinary PAGE field, though.

Greetinx
Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top