Combining Documents - Locking Fields

J

Jezebel

It's called 'unlinking' -- .Fields.Unlink; but --

1. Calling it on the ActiveDocument alone is not sufficient, because that
won't pick up fields not in the main body of the document. You need to
iterate the StoryRanges for that.

2. It won't solve your problem anyway (assuming your page numbers are in the
header or footer), because there isn't a separate { PAGE } field for every
page. At most you have first/even/odd pages for each section. Unlinking the
PAGE fields will mean each page shows the same number in each case. In the
simplest case, after unlinking each page will be numbered 1.


As previously suggested: put each document in a seperate section and restart
the numbering in each case, or use PDFs.
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Derek:

I think you need to redefine the question :) This is a
Formatting.longdocuments question, by the way: it doesn't belong in any of
the three groups you posted to :)

When you combine documents, you WANT the page numbering to refresh, because
the text you add is no longer "Page 30 in Document 1" it is now "Page 327 in
Document 2".

If you do not want that to happen, may I ask *why*? The long-document
industry has spent the past 30 years trying to persuade publishers that
READERS (isn't that who we're trying to serve, after all?) want their page
numbers to start from 1 and continue to the back of the book in an unbroken
stream. And if they don't the Readers can't find anything, in either the
TOC or the Index, so they give up on the book!

Now: If the only "reader" of this text is going to be a machine, not a
human being, I can tell you how to do it. But I need to know why you want
it so I can suggest the best method. (Email me direct: I don't get into
this group much...)

On the other hand, if you are hoping that human beings are going to use your
publication, the best suggestion I can give you is *DON'T* :)

Cheers


OK, the process of combining documents causes problems with page numbering.
Is there a way to lock in the fields in a given document. The doc opens
with VBA, and then I could run some code like Activedocument.Lockfields.
Then when I combine the documents, the fields would not update and cause
page numbering problems. What do you think?

Derek

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
 
D

Derek Hart

OK, the process of combining documents causes problems with page numbering.
Is there a way to lock in the fields in a given document. The doc opens
with VBA, and then I could run some code like Activedocument.Lockfields.
Then when I combine the documents, the fields would not update and cause
page numbering problems. What do you think?

Derek
 

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

Top