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  

Auto update TOC and page number cross-references



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2005, 02:30 PM
Faith
external usenet poster
 
Posts: n/a
Default Auto update TOC and page number cross-references

Does anyone know of a way to have Word automatically update TOC fields and
page number cross-references within tables when a document is opened and/or
printed? I know the updates can be performed by selected the text and
pressing F9, but I don't want my readers of my doc to have to do this.
  #2  
Old August 20th, 2005, 12:21 AM
Anne Troy
external usenet poster
 
Posts: n/a
Default Auto update TOC and page number cross-references

There are other ways.
http://www.officearticles.com/word/u...osoft_word.htm

************
Anne Troy
www.OfficeArticles.com

"Faith" wrote in message
news
Does anyone know of a way to have Word automatically update TOC fields and
page number cross-references within tables when a document is opened
and/or
printed? I know the updates can be performed by selected the text and
pressing F9, but I don't want my readers of my doc to have to do this.


  #3  
Old August 22nd, 2005, 02:29 PM
Faith
external usenet poster
 
Posts: n/a
Default Auto update TOC and page number cross-references

Thanks, Anne, but what I'm looking for (and it may not exist) is a way to
have Word automatically update all fields when the document is OPENED.

Do you know how to do this?

(By the way, I didn't know that a "Print Preview" updates the fields -- good
info!)

"Anne Troy" wrote:

There are other ways.
http://www.officearticles.com/word/u...osoft_word.htm

************
Anne Troy
www.OfficeArticles.com

"Faith" wrote in message
news
Does anyone know of a way to have Word automatically update TOC fields and
page number cross-references within tables when a document is opened
and/or
printed? I know the updates can be performed by selected the text and
pressing F9, but I don't want my readers of my doc to have to do this.




  #4  
Old August 22nd, 2005, 04:08 PM
Suzanne S. Barnhill
external usenet poster
 
Posts: n/a
Default Auto update TOC and page number cross-references

Have you tried an AutoOpen macro as previously suggested?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Faith" wrote in message
news
Thanks, Anne, but what I'm looking for (and it may not exist) is a way to
have Word automatically update all fields when the document is OPENED.

Do you know how to do this?

(By the way, I didn't know that a "Print Preview" updates the fields --
good
info!)

"Anne Troy" wrote:

There are other ways.
http://www.officearticles.com/word/u...osoft_word.htm

************
Anne Troy
www.OfficeArticles.com

"Faith" wrote in message
news
Does anyone know of a way to have Word automatically update TOC fields

and
page number cross-references within tables when a document is opened
and/or
printed? I know the updates can be performed by selected the text and
pressing F9, but I don't want my readers of my doc to have to do this.





  #5  
Old August 22nd, 2005, 05:17 PM
Charles Kenyon
external usenet poster
 
Posts: n/a
Default Auto update TOC and page number cross-references

The following macro will update TOC fields and REF fields.
Sub AutoOpen()
' Written by Charles Kyle Kenyon 15 November 2001
' repaired by Jezebel
' All Story Field Updater - TOC fields
Dim oField As Field
Dim oStory As Range
' On Error Resume Next
For Each oStory In ActiveDocument.StoryRanges
' This goes into headers and footers as well as the regular document
Do
For Each oField In oStory.Fields
If oField.Type = wdFieldTOC Then
oField.Update
End If
If oField.Type = wdFieldREF Then
oField.Update
End If
Next oField
Set oStory = oStory.Next
Loop Until oStory Is Nothing
Next oStory
End Sub
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Faith" wrote in message
news
Does anyone know of a way to have Word automatically update TOC fields and
page number cross-references within tables when a document is opened
and/or
printed? I know the updates can be performed by selected the text and
pressing F9, but I don't want my readers of my doc to have to do this.


  #6  
Old August 22nd, 2005, 05:59 PM
Faith
external usenet poster
 
Posts: n/a
Default Auto update TOC and page number cross-references

No, I haven't because I'm not sure yet how Adobe will handle a macro. If
there's no such configuration within Word for handling the update upon
opening the doc, I guess I'll experiment with the macro.

Thanks!

"Suzanne S. Barnhill" wrote:

Have you tried an AutoOpen macro as previously suggested?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Faith" wrote in message
news
Thanks, Anne, but what I'm looking for (and it may not exist) is a way to
have Word automatically update all fields when the document is OPENED.

Do you know how to do this?

(By the way, I didn't know that a "Print Preview" updates the fields --

good
info!)

"Anne Troy" wrote:

There are other ways.
http://www.officearticles.com/word/u...osoft_word.htm

************
Anne Troy
www.OfficeArticles.com

"Faith" wrote in message
news Does anyone know of a way to have Word automatically update TOC fields

and
page number cross-references within tables when a document is opened
and/or
printed? I know the updates can be performed by selected the text and
pressing F9, but I don't want my readers of my doc to have to do this.





  #7  
Old August 22nd, 2005, 05:59 PM
Faith
external usenet poster
 
Posts: n/a
Default Auto update TOC and page number cross-references

Thanks, Charles!

"Charles Kenyon" wrote:

The following macro will update TOC fields and REF fields.
Sub AutoOpen()
' Written by Charles Kyle Kenyon 15 November 2001
' repaired by Jezebel
' All Story Field Updater - TOC fields
Dim oField As Field
Dim oStory As Range
' On Error Resume Next
For Each oStory In ActiveDocument.StoryRanges
' This goes into headers and footers as well as the regular document
Do
For Each oField In oStory.Fields
If oField.Type = wdFieldTOC Then
oField.Update
End If
If oField.Type = wdFieldREF Then
oField.Update
End If
Next oField
Set oStory = oStory.Next
Loop Until oStory Is Nothing
Next oStory
End Sub
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

"Faith" wrote in message
news
Does anyone know of a way to have Word automatically update TOC fields and
page number cross-references within tables when a document is opened
and/or
printed? I know the updates can be performed by selected the text and
pressing F9, but I don't want my readers of my doc to have to do this.




 




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


All times are GMT +1. The time now is 01:57 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.