Update multiple fields at once?

  • Thread starter Thread starter AlecZender
  • Start date Start date
A

AlecZender

I regularly use word to write reports of around 80-90 pages, and use the
'Citations and Bibliography' and 'Table of Contents' tools in Word 2007 to
automatically generate information.
However, I find it tedious and annoying to have to work slowly through the
whole document clicking update on each of the fields they create if I change
something.
Is there a solution - is there a way to update all the fields in a document
at once??

Thanks for anybody's help!

Alec
 
That's awesome - you have no idea the amount of time i've wasted updating
fields individually
 
That's awesome - you have no idea the amount of time i've wasted updating
fields individually







- Show quoted text -

Kathy/Alec

That is one way. It has the limitation that CTRL+a (select all) and
F9 only updates fields in the current storyrange. Another way is if
you have "update fields" set in your print dialog options then you can
simply toggle in and out of Print Preview. The most comprehensive way
that I know of is to run a macro something like:

Public Sub UpdateAllFields()
Dim rngStory As Word.Range
Dim lngJunk As Long
Dim oShp As Shape
lngJunk = ActiveDocument.Sections(1).Headers(1).Range.StoryType
For Each rngStory In ActiveDocument.StoryRanges
'Iterate through all linked stories
Do
On Error Resume Next
rngStory.Fields.Update
Select Case rngStory.StoryType
Case 6, 7, 8, 9, 10, 11
If rngStory.ShapeRange.Count > 0 Then
For Each oShp In rngStory.ShapeRange
If oShp.TextFrame.HasText Then
oShp.TextFrame.TextRange.Fields.Update
End If
Next
End If
Case Else
'Do Nothing
End Select
On Error GoTo 0
'Get next linked story (if any)
Set rngStory = rngStory.NextStoryRange
Loop Until rngStory Is Nothing
Next
End Sub
 
I regularly use word to write reports of around 80-90 pages, and use the
'Citations and Bibliography' and 'Table of Contents' tools in Word 2007 to
automatically generate information.
However, I find it tedious and annoying to have to work slowly through the
whole document clicking update on each of the fields they create if I change
something.
Is there a solution - is there a way to update all the fields in a document
at once??

Thanks for anybody's help!

Alec

Next to all the other answers given in this thread, when it comes to
citations and bibliography, by reselecting the style from the dropdown
list, all citation and bibliography fields get automatically updated.

Yves
 
Back
Top