N
Nuzza
I'm having trouble creating a macro that will refresh all the document
properties in my document, including data contained in the fields in File >
Properties, headers and footers, and table of contents.
The usual method I use to update all properties in the document is to go to
Normal view, then Ctrl+A to select everything in the document, then hit the
F9 key (and if the document contains a TOC I'm prompted to update the table,
to which I select "Update entire table" then OK). This then updates all
fields in the document.
What I'm trying to do is insert a button onto my toolbar that is linked to a
macro, but each time I create the macro following the steps described above,
the macro updates all the document properties except for the TOC.
I then tried to create a macro that only refreshes the TOC, but once I'm in
record macro mode, I can't actually select the TOC so that I can right-click
it. I've even tried to do Edit, Go To, Field, TOC (there's only 1 TOC in my
document), but when I run the macro nothing happens and it seems to not
refresh my TOC.
I don't want to overwrite the TOC, just refresh it, and there doesn't seem
to be a button anywhere in the File menu to do this. I'm also not familiar
with the coding syntax in Visual Basic Editor to change this.
Any suggestions would be much appreciated.
Thank you.
properties in my document, including data contained in the fields in File >
Properties, headers and footers, and table of contents.
The usual method I use to update all properties in the document is to go to
Normal view, then Ctrl+A to select everything in the document, then hit the
F9 key (and if the document contains a TOC I'm prompted to update the table,
to which I select "Update entire table" then OK). This then updates all
fields in the document.
What I'm trying to do is insert a button onto my toolbar that is linked to a
macro, but each time I create the macro following the steps described above,
the macro updates all the document properties except for the TOC.
I then tried to create a macro that only refreshes the TOC, but once I'm in
record macro mode, I can't actually select the TOC so that I can right-click
it. I've even tried to do Edit, Go To, Field, TOC (there's only 1 TOC in my
document), but when I run the macro nothing happens and it seems to not
refresh my TOC.
I don't want to overwrite the TOC, just refresh it, and there doesn't seem
to be a button anywhere in the File menu to do this. I'm also not familiar
with the coding syntax in Visual Basic Editor to change this.
Any suggestions would be much appreciated.
Thank you.