Not all pageref fields in TOC get updated. BTW the pageref are wrong
on screen, but the links work properly...clicking on pageref brings me
to the correct place in the document
If I manually "select all" and press F9 repeteadly several times,
eventually all fields get updated.
So here is the first problem, as the whole process needs to be
automated, I need to be able to implement updating fileds in VBA macro.
I even tried puting Timer in VBA, waiting 10 secnds and updating fields
again, doing this several times, but no cigar.
Also, if I update fieldd manually (so they are all OK) and then switch
to print preview (and back), the pageref fields revert back to
original dummy values. (and yes, option update fields on print is
selected)
Does anyone have a clue why is this happening? Anyone else have seen
something like this? Other articles in this group suggest that PAGEREF
is supposed to work better than sectionpages field or numpages fields,
but for me it seems to be opposite...
Any help will be appreciated
iza
selection.EndKey unit:=wdstory
selection.HomeKey unit:=wdstory
ActiveDocument.Fields.Update
with this piece of code, all fields are updated properly. Also works when
manually going to the end of document and then to the top, and updating all
fields- no more multiple updates needed. PrintPreview still messes them up
though...
"iza" <dono...@postoffice.not> wrote in message
news:3%KIg.129729$P02....@fe07.news.easynews.com...
You've found it. The problem is that by the time you come to update the
fields, the document has not completed pagination.
Your macro is as good a way as any of forcing it to do that: it has to
resolve the pagination in order to find the "end".
You could try:
With ActiveDocument
.Repaginate
.Fields.Update
End With
Which is a slightly more elegant way of doing the same thing, but I don;t
trust it. I am not sure that Word will correctly wait for the completion of
the Repaginate before running the fields.update.
However, if it does, ActiveDocument.Fields.Update updates all of the fields
in the document in a single command without any silly prompting as to what
you want to do :-)
Cheers
On 29/8/06 12:36 PM, in article
bLNIg.659272$1Q1.1...@fe03.news.easynews.com, "iza"
<dono...@postoffice.not> wrote:
--
Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.
John McGhie <jo...@mcghie.name>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410
iza
This will force an update of all fields and a repagination. These are
required to draw an accurate Print Preview.
And if there's anything wrong with your field updating, you will see it...
Cheers
On 1/9/06 4:20 AM, in article
1157048441.9...@p79g2000cwp.googlegroups.com, "ip"
I'm not understanding your situation. Every time you go into Print Preview,
hot fields will update. Warm fields will update if you have "Update fields"
set in your Print options. Cold fields will update only if you update them.
Hot fields are those that update continuously: PAGE fields are an example.
Warm fields are those that are updated on document open: DATE fields are an
example. Cold fields are those that must be updated manually: SEQ fields
are an example.
Cheers
On 7/9/06 12:59 AM, in article
1157554761.5...@m79g2000cwm.googlegroups.com, "ip"