D
Deborah C
Hi All,
I had some 'Update All' Macros set up in all my document templates that have
suddenly stopped working. I've given up trying to figure out why now, I just
want to fix the problem. These templates are used as the basis for many
documents.
I'm on Word 2000 9.0.6926 SP3. Nothing has changed for me in years, but
other people in the office are starting to get XP - maybe that is making a
difference?
The macro that used to work was:
Selection.WholeStory
Selection.Fields.Update
Selection.HomeKey Unit:=wdStory
Now that doesn't seem to do much at all.
So I tried a different macro, but got "Run time error -2147467259
(800004005) Method 'update' of object 'table of contents' failed"
Sub UpdateAll()
Dim aStory As Range
Dim aField As Field
ActiveDocument.TablesOfContents(1).Update
For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory
End Sub
If I take the TOC part out, it updates everything in the document except the
TOC.
Can anyone point me in the right direction here?
I had some 'Update All' Macros set up in all my document templates that have
suddenly stopped working. I've given up trying to figure out why now, I just
want to fix the problem. These templates are used as the basis for many
documents.
I'm on Word 2000 9.0.6926 SP3. Nothing has changed for me in years, but
other people in the office are starting to get XP - maybe that is making a
difference?
The macro that used to work was:
Selection.WholeStory
Selection.Fields.Update
Selection.HomeKey Unit:=wdStory
Now that doesn't seem to do much at all.
So I tried a different macro, but got "Run time error -2147467259
(800004005) Method 'update' of object 'table of contents' failed"
Sub UpdateAll()
Dim aStory As Range
Dim aField As Field
ActiveDocument.TablesOfContents(1).Update
For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory
End Sub
If I take the TOC part out, it updates everything in the document except the
TOC.
Can anyone point me in the right direction here?