update header on page 2

E

Eric

I would like to update the header on page2 (and beyond) when/if a document
is 2 pages or more (that's not always the case). I have turned on the
different 1:st page and the first page is working fine but...

1) Is there any way to know if/when the document becomes longer than 1 page?
2) When I update the header you kind of "see" that the document "flashes"
through the header shortly, is there any way to turn of that?

Any input appreciated.

/e
 
H

Helmut Weber

Hi Eric,
I think there is no way to access the header on page 2,
on page 2 exactly, that is, as it is identical with the header
on the following pages. Means, there are only two headers,
as you described it, one for page 1, one for the following pages.
However, the storyrange of the header on page 1 will
have a .NextStoryRange. See
http://word.mvps.org/FAQs/MacrosVBA/FindReplaceAllWithVBA.htm
' by Doug Robbins
So if you loop through all storyranges and find a header-storyrange,
proceed to it's NextStoryRange. If you use the range object, there
should be no flashing, when changing it. Furthermore, I don't think
there is a practical way, to check, whether the document has become
longer than 1 page. You may check the number of pages at any time, but
not on the fly without decreasing performance and not without possible
complications. If it has to be, then the way would be an ontime-macro,
that checks the number of pages periodically and is called back
from the pages-check. Not advisable, I'd say.
 
E

Eric

Thanks!

I tried another solution by inserting a bookmark in the header and accessing
it that way which worked fine (the problem was the the doc was
locked/protected) and actually *that* was the problem. Now it works fine
though. Again, thanks for your response, really appreciate it.

:)

/e
 

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