View Single Post
  #3  
Old July 9th, 2004, 12:04 PM
Kathleen
external usenet poster
 
Posts: n/a
Default Can't update TOC programmatically (but it worked yesterday)

Some more info. This is Word 2002 SP-2. I can manually
select the TOC and update it. That's OK.

I can do Select All + F9 to update it. That's OK.

But if I record a macro that does Select All + F9, it
works while I'm recording the macro, but if I play it
back then macro stops working.

The recorded macro looks like this:
Selection.WholeStory
Selection.Fields.Update

Have I accidentally done something bad in Options? I am
forcing the setting for "Update fields when Printing" to
be true in the main macro (that's my workaround for
updating fields in the header)

I'd be very grateful for any insight into this. I need to
release this template and macro set for a group it's just
too flaky to inflict on innoncent people.