#1   Report Post  
mlse mlse is offline
Junior Member
 
Posts: 2
Default Auto-update of fields?

Hi, How can I make all the fields in my document automatically update (e.g. like the page count field does by default) instead of having to manually click on each field in turn and update it?

Thanks.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Auto-update of fields?

Hi mlse,

Most, if not all, of your fields will update if you do a Print Preview. Also make sure you've checked the:
.. 'update automatics links at open' option under Tools|Options|General
.. 'update fields' and 'update links' options under Tools|Options|Print.

If that's not enough for you, you can try the following macro:
Sub RefreshFields()
Dim TOC As TableOfContents ' Table of Contents Object
Dim TOA As TableOfAuthorities ' Table of Authorities Object
Dim TOF As TableOfFigures ' Table of Figures Object
Dim pRange As Range ' Word Range Object
Call MacroEntry
With ActiveDocument
' Loop through Story Ranges and update.
' Note that this may trigger interactive fields (eg ASK and FILLIN).
For Each pRange In .StoryRanges
Do
pRange.Fields.Update
Set pRange = pRange.NextStoryRange
Loop Until pRange Is Nothing
Next
' The following routines are necessary because the foregoing updates only page numbers
' in TOCs, TOAs and TOFs - field updating doesn't update TOC, TOA or TOF contents.
' Loop through Tables Of Contents and update
For Each TOC In .TablesOfContents
TOC.Update
Next
' Loop through Tables Of Authorities and update
For Each TOA In .TablesOfAuthorities
TOA.Update
Next
' Loop through Tables Of Figures and update
For Each TOF In .TablesOfFigures
TOF.Update
Next
End With
Call AcceptTrackedFields
Call MacroExit
End Sub


--
Cheers
macropod
[Microsoft MVP - Word]


"mlse" .uk wrote in message ...

Hi, How can I make all the fields in my document automatically update
(e.g. like the page count field does by default) instead of having to
manually click on each field in turn and update it?

Thanks.




--
mlse

  #3   Report Post  
mlse mlse is offline
Junior Member
 
Posts: 2
Default

Thanks! I found a hacky work-around using references, but I will try your macro!
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto update fields when opening document, problems. [email protected] Microsoft Word Help 1 April 9th 09 04:05 PM
Add fields that auto-update Michael D Microsoft Word Help 3 June 4th 08 02:58 PM
How to auto-update REF fields if related ASK field bookmark is upd DENCAS44 Microsoft Word Help 1 December 17th 07 11:22 AM
Auto Update of formula fields Maria Microsoft Word Help 1 October 3rd 07 05:42 AM
Attempting to auto-update fields in a word document Sanin R Microsoft Word Help 1 January 7th 05 06:39 PM


All times are GMT +1. The time now is 04:16 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"