Group:  Microsoft Word ยป microsoft.public.word.numbering
Thread: pageref woes

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

pageref woes
"iza" <donotcall[ at ]postoffice.not> 28.08.2006 23:29:03
I am using word 2000 with sp 3. In my document I have to create a weird
TOC: the "chapter names" entries are to be in blue but leader dots and
page numbers in black. The only way I figured out how to do that is to
bookmark the chaptes and construct each "TOC entry" as hyperlink to
the chapter bookmarks + pageref field to the bookmark.
On top of this, I have a VBA macro users need to run to accomplish
other tasks (include files, break links to the included files etc). I
made sure that bookmarks are NOT in included files but in the main
document. This macro also updates fields to show correct page numbers
in TOC - or is supposed to - and here is the problem:

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



Re: pageref woes
"iza" <donotcall[ at ]postoffice.not> 29.08.2006 02:36:56
Partially answering my own question:

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" <donotcall[ at ]postoffice.not> wrote in message
news:3%KIg.129729$P02.69320[ at ]fe07.news.easynews.com...
[Quoted Text]
>I am using word 2000 with sp 3. In my document I have to create a weird
> TOC: the "chapter names" entries are to be in blue but leader dots and
> page numbers in black. The only way I figured out how to do that is to
> bookmark the chaptes and construct each "TOC entry" as hyperlink to
> the chapter bookmarks + pageref field to the bookmark.
> On top of this, I have a VBA macro users need to run to accomplish
> other tasks (include files, break links to the included files etc). I
> made sure that bookmarks are NOT in included files but in the main
> document. This macro also updates fields to show correct page numbers
> in TOC - or is supposed to - and here is the problem:
>
> 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
>
>
>


Re: pageref woes
"John McGhie [MVP - Word and Word Macintosh]" <john[ at ]mcghie.name> 31.08.2006 11:55:38
Hi iza:

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.188966[ at ]fe03.news.easynews.com, "iza"
<donotcall[ at ]postoffice.not> wrote:

[Quoted Text]
> Partially answering my own question:
>
> 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" <donotcall[ at ]postoffice.not> wrote in message
> news:3%KIg.129729$P02.69320[ at ]fe07.news.easynews.com...
>> I am using word 2000 with sp 3. In my document I have to create a weird
>> TOC: the "chapter names" entries are to be in blue but leader dots and
>> page numbers in black. The only way I figured out how to do that is to
>> bookmark the chaptes and construct each "TOC entry" as hyperlink to
>> the chapter bookmarks + pageref field to the bookmark.
>> On top of this, I have a VBA macro users need to run to accomplish
>> other tasks (include files, break links to the included files etc). I
>> made sure that bookmarks are NOT in included files but in the main
>> document. This macro also updates fields to show correct page numbers
>> in TOC - or is supposed to - and here is the problem:
>>
>> 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
>>
>>
>>
>
>

--

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

John McGhie <john[ at ]mcghie.name>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

Re: pageref woes
"ip" <peszeks[ at ]optonline.net> 31.08.2006 18:20:41
John,
thank you very much - I will try your suggestion.
You woudl not have a clue why print preview messes the pageref numbers
and seq fields ?...

iza


John McGhie [MVP - Word and Word Macintosh] wrote:
[Quoted Text]
> Hi iza:
>
> 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.188966[ at ]fe03.news.easynews.com, "iza"
> <donotcall[ at ]postoffice.not> wrote:
>
> > Partially answering my own question:
> >
> > 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" <donotcall[ at ]postoffice.not> wrote in message
> > news:3%KIg.129729$P02.69320[ at ]fe07.news.easynews.com...
> >> I am using word 2000 with sp 3. In my document I have to create a weird
> >> TOC: the "chapter names" entries are to be in blue but leader dots and
> >> page numbers in black. The only way I figured out how to do that is to
> >> bookmark the chaptes and construct each "TOC entry" as hyperlink to
> >> the chapter bookmarks + pageref field to the bookmark.
> >> On top of this, I have a VBA macro users need to run to accomplish
> >> other tasks (include files, break links to the included files etc). I
> >> made sure that bookmarks are NOT in included files but in the main
> >> document. This macro also updates fields to show correct page numbers
> >> in TOC - or is supposed to - and here is the problem:
> >>
> >> 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
> >>
> >>
> >>
> >
> >
>
> --
>
> Please reply to the newsgroup to maintain the thread. Please do not email
> me unless I ask you to.
>
> John McGhie <john[ at ]mcghie.name>
> Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
> Sydney, Australia +61 (0) 4 1209 1410

Re: pageref woes
"John McGhie [MVP - Word and Word Macintosh]" <john[ at ]mcghie.name> 02.09.2006 13:40:44
Yep. Print Preview sends the document to the "Printer" then intercepts the
result and displays that on the screen (effectively, it tells the printer
driver that the screen is a sheet of paper...)

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.916779.273030[ at ]p79g2000cwp.googlegroups.com, "ip"
<peszeks[ at ]optonline.net> wrote:

[Quoted Text]
> John,
> thank you very much - I will try your suggestion.
> You woudl not have a clue why print preview messes the pageref numbers
> and seq fields ?...
>
> iza
>
>
> John McGhie [MVP - Word and Word Macintosh] wrote:
>> Hi iza:
>>
>> 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.188966[ at ]fe03.news.easynews.com, "iza"
>> <donotcall[ at ]postoffice.not> wrote:
>>
>>> Partially answering my own question:
>>>
>>> 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" <donotcall[ at ]postoffice.not> wrote in message
>>> news:3%KIg.129729$P02.69320[ at ]fe07.news.easynews.com...
>>>> I am using word 2000 with sp 3. In my document I have to create a weird
>>>> TOC: the "chapter names" entries are to be in blue but leader dots and
>>>> page numbers in black. The only way I figured out how to do that is to
>>>> bookmark the chaptes and construct each "TOC entry" as hyperlink to
>>>> the chapter bookmarks + pageref field to the bookmark.
>>>> On top of this, I have a VBA macro users need to run to accomplish
>>>> other tasks (include files, break links to the included files etc). I
>>>> made sure that bookmarks are NOT in included files but in the main
>>>> document. This macro also updates fields to show correct page numbers
>>>> in TOC - or is supposed to - and here is the problem:
>>>>
>>>> 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
>>>>
>>>>
>>>>
>>>
>>>
>>
>> --
>>
>> Please reply to the newsgroup to maintain the thread. Please do not email
>> me unless I ask you to.
>>
>> John McGhie <john[ at ]mcghie.name>
>> Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
>> Sydney, Australia +61 (0) 4 1209 1410
>

--

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

John McGhie <john[ at ]mcghie.name>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

Re: pageref woes
"ip" <peszeks[ at ]optonline.net> 06.09.2006 14:59:21
Thanks John, This is how I understood Print Preview works.
The puzzle is, after updating fields (either manually or from macro)
and then switchign to print preview, the fields revert back to
un-updated state :-((

iza


John McGhie [MVP - Word and Word Macintosh] wrote:
[Quoted Text]
> Yep. Print Preview sends the document to the "Printer" then intercepts the
> result and displays that on the screen (effectively, it tells the printer
> driver that the screen is a sheet of paper...)
>
> 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.916779.273030[ at ]p79g2000cwp.googlegroups.com, "ip"
> <peszeks[ at ]optonline.net> wrote:
>
> > John,
> > thank you very much - I will try your suggestion.
> > You woudl not have a clue why print preview messes the pageref numbers
> > and seq fields ?...
> >
> > iza
> >
> >
> > John McGhie [MVP - Word and Word Macintosh] wrote:
> >> Hi iza:
> >>
> >> 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.188966[ at ]fe03.news.easynews.com, "iza"
> >> <donotcall[ at ]postoffice.not> wrote:
> >>
> >>> Partially answering my own question:
> >>>
> >>> 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" <donotcall[ at ]postoffice.not> wrote in message
> >>> news:3%KIg.129729$P02.69320[ at ]fe07.news.easynews.com...
> >>>> I am using word 2000 with sp 3. In my document I have to create a weird
> >>>> TOC: the "chapter names" entries are to be in blue but leader dots and
> >>>> page numbers in black. The only way I figured out how to do that is to
> >>>> bookmark the chaptes and construct each "TOC entry" as hyperlink to
> >>>> the chapter bookmarks + pageref field to the bookmark.
> >>>> On top of this, I have a VBA macro users need to run to accomplish
> >>>> other tasks (include files, break links to the included files etc). I
> >>>> made sure that bookmarks are NOT in included files but in the main
> >>>> document. This macro also updates fields to show correct page numbers
> >>>> in TOC - or is supposed to - and here is the problem:
> >>>>
> >>>> 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
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >> --
> >>
> >> Please reply to the newsgroup to maintain the thread. Please do not email
> >> me unless I ask you to.
> >>
> >> John McGhie <john[ at ]mcghie.name>
> >> Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
> >> Sydney, Australia +61 (0) 4 1209 1410
> >
>
> --
>
> Please reply to the newsgroup to maintain the thread. Please do not email
> me unless I ask you to.
>
> John McGhie <john[ at ]mcghie.name>
> Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
> Sydney, Australia +61 (0) 4 1209 1410

Re: pageref woes
"John McGhie [MVP - Word and Word Macintosh]" <john[ at ]mcghie.name> 08.09.2006 10:07:17
Which fields are we talking about? (What's the field code...)?

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.531523.293110[ at ]m79g2000cwm.googlegroups.com, "ip"
<peszeks[ at ]optonline.net> wrote:

[Quoted Text]
> Thanks John, This is how I understood Print Preview works.
> The puzzle is, after updating fields (either manually or from macro)
> and then switchign to print preview, the fields revert back to
> un-updated state :-((
>
> iza
>
>
> John McGhie [MVP - Word and Word Macintosh] wrote:
>> Yep. Print Preview sends the document to the "Printer" then intercepts the
>> result and displays that on the screen (effectively, it tells the printer
>> driver that the screen is a sheet of paper...)
>>
>> 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.916779.273030[ at ]p79g2000cwp.googlegroups.com, "ip"
>> <peszeks[ at ]optonline.net> wrote:
>>
>>> John,
>>> thank you very much - I will try your suggestion.
>>> You woudl not have a clue why print preview messes the pageref numbers
>>> and seq fields ?...
>>>
>>> iza
>>>
>>>
>>> John McGhie [MVP - Word and Word Macintosh] wrote:
>>>> Hi iza:
>>>>
>>>> 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.188966[ at ]fe03.news.easynews.com, "iza"
>>>> <donotcall[ at ]postoffice.not> wrote:
>>>>
>>>>> Partially answering my own question:
>>>>>
>>>>> 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" <donotcall[ at ]postoffice.not> wrote in message
>>>>> news:3%KIg.129729$P02.69320[ at ]fe07.news.easynews.com...
>>>>>> I am using word 2000 with sp 3. In my document I have to create a weird
>>>>>> TOC: the "chapter names" entries are to be in blue but leader dots and
>>>>>> page numbers in black. The only way I figured out how to do that is to
>>>>>> bookmark the chaptes and construct each "TOC entry" as hyperlink to
>>>>>> the chapter bookmarks + pageref field to the bookmark.
>>>>>> On top of this, I have a VBA macro users need to run to accomplish
>>>>>> other tasks (include files, break links to the included files etc). I
>>>>>> made sure that bookmarks are NOT in included files but in the main
>>>>>> document. This macro also updates fields to show correct page numbers
>>>>>> in TOC - or is supposed to - and here is the problem:
>>>>>>
>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>>
>>>> Please reply to the newsgroup to maintain the thread. Please do not email
>>>> me unless I ask you to.
>>>>
>>>> John McGhie <john[ at ]mcghie.name>
>>>> Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
>>>> Sydney, Australia +61 (0) 4 1209 1410
>>>
>>
>> --
>>
>> Please reply to the newsgroup to maintain the thread. Please do not email
>> me unless I ask you to.
>>
>> John McGhie <john[ at ]mcghie.name>
>> Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
>> Sydney, Australia +61 (0) 4 1209 1410
>

--

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

John McGhie <john[ at ]mcghie.name>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net