View Single Post
 
Old 01-20-2012, 04:42 AM
Jamal NUMAN Jamal NUMAN is offline Windows 7 64bit Office 2010 64bit
Expert
 
Join Date: Nov 2010
Posts: 615
Jamal NUMAN is on a distinguished road
Question

Quote:
Originally Posted by Catalin.B View Post
Another thing you can do, is to place this code in Normal Template's This Document module, then place a button on the quick acces toolbar with this macro assigned, to update fields whenever you decide to...
Code:
Sub UpdateAllFields()

Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
    oStory.Fields.Update
    If oStory.StoryType <> wdMainTextStory Then
        While Not (oStory.NextStoryRange Is Nothing)
            Set oStory = oStory.NextStoryRange
            oStory.Fields.Update
        Wend
    End If
Next oStory
Set oStory = Nothing
End Sub
Hi Colin,

As I have already posted in the previous participation, can the macro (that you have provided) be developed to be embedded to a specific document (screenshot 1) such that:
· All the fields are updated when: save, save as, open or print are clicked
· All fields existing in the header and footer are updated are well
In this case, I think that I’m forced to save the document as *.docm, is that true?
Is there a way to have this property with the regular file extension (*.docx)?
Many thanks
Jamal
Attached Images
File Type: jpg Clip_300.jpg (108.4 KB, 57 views)
Reply With Quote