Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 01-26-2012, 04:03 PM
Jamal NUMAN Jamal NUMAN is offline Does Word have an option to update fields AUTOMATICALLY at open??? Windows 7 64bit Does Word have an option to update fields AUTOMATICALLY at open??? Office 2010 64bit
Expert
Does Word have an option to update fields AUTOMATICALLY at open???
 
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 Catalin,

I'm not sure if this code can be developed to be embedded in the document (and work through a macro) to update the fields automatically as we: save, save as, open, or print.

thank you

regards

Jamal
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to update fields rhatx Word VBA 0 03-02-2011 12:14 PM
VBA to update certain (but not all) fields sparkyrose Word VBA 0 05-20-2010 12:50 PM
Can no longer update fields! slindsay Word 0 09-03-2009 05:10 PM
Automatically update text changes in word – Word 2007 webarnes Word 1 05-29-2009 02:48 PM
Automatically update text changes in Word - how do I do it? jonrm Word 2 05-21-2009 08:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft