R
RWN
Wd97/NT4 & Wd2k/Win2kPro
(having my share of problems!)
Sub LocTOC()
If ActiveWindow.ActivePane.View.ShowAll Then
ActiveWindow.ActivePane.View.ShowAll = False
ActiveDocument.TablesOfContents(1).Update
'ActiveDocument.TablesOfContents(1).UpdatePageNumbers
End Sub
After text (Auto Text as well as InsertFile) added this routine is
called.
The 1st statement ensures that the hidden text is not displayed (using a
hidden paragraph mark to get run-in headings).
Updates table entries ok but sets all page #'s as "1" on display.
Clicking on the page # does take me to the actual page however.
Ok when "Print View" and printed. Also corrects itself if manually
updating table/page numbers.
Even tried calling for "Update" AND UpdatePageNumbers" (hence the rem'd
statement), no go.
The major problem I'm having is that it is intermittent.
Under the same scenarios (same AutoText or InsertFile addition) it will
sometimes work and sometimes not.
Tried scrolling etc. to see if it was a refresh problem, but it stayed
the same.
Any ideas?
(having my share of problems!)
Sub LocTOC()
If ActiveWindow.ActivePane.View.ShowAll Then
ActiveWindow.ActivePane.View.ShowAll = False
ActiveDocument.TablesOfContents(1).Update
'ActiveDocument.TablesOfContents(1).UpdatePageNumbers
End Sub
After text (Auto Text as well as InsertFile) added this routine is
called.
The 1st statement ensures that the hidden text is not displayed (using a
hidden paragraph mark to get run-in headings).
Updates table entries ok but sets all page #'s as "1" on display.
Clicking on the page # does take me to the actual page however.
Ok when "Print View" and printed. Also corrects itself if manually
updating table/page numbers.
Even tried calling for "Update" AND UpdatePageNumbers" (hence the rem'd
statement), no go.
The major problem I'm having is that it is intermittent.
Under the same scenarios (same AutoText or InsertFile addition) it will
sometimes work and sometimes not.
Tried scrolling etc. to see if it was a refresh problem, but it stayed
the same.
Any ideas?