A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can't update TOC programmatically (but it worked yesterday)



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old July 9th, 2004, 10:27 AM
Kathleen
external usenet poster
 
Posts: n/a
Default Can't update TOC programmatically (but it worked yesterday)

This is a strange one. I took the standard macro that
updates all fields in the doc from the Microsoft website.
Yesterday it worked. Today it doesn't. Any ideas what I
might have done to the doc to break it? (I can still
manually update the TOC).

Dim aStory As Range
Dim aField As Field

For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory

(By the way, despite what our friends at Microsoft say,
it doesn't update ALL fields, it misses out any that are
in the headers & footers but that's a different story.
bStory, perhaps? I have a workaround for that little
problem that *does* work, if anyone is interested)
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update another table with a Max record query Ngan Running & Setting Up Queries 2 June 22nd, 2004 05:01 PM
ie6 sp1 update fails->"wfp: unrecognized version" Beemer Biker Outlook Express 2 June 14th, 2004 10:36 PM
Can't update table from Form sara Using Forms 3 June 11th, 2004 02:12 PM
Why no update? Help! Brian New Users 1 May 6th, 2004 11:15 AM


All times are GMT +1. The time now is 12:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.