![]() |
|
|
|
#1
|
|||
|
|||
|
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
|
|
#2
|
|||
|
|||
|
Quote:
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 |
|
#3
|
|||
|
|||
|
Quote:
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 |
|
#4
|
|||
|
|||
|
Quote:
Originally Posted by Catalin.B "then place a button on the quick acces toolbar with this macro assigned, to update fields whenever you decide to..." But now you have a great solution from Paul...
|
|
#5
|
|||
|
|||
|
Quote:
I tried it and it worked very well! what i wanted is to Automate this behavior (updating fields) as we: save, save as, open or print in the AutoCAD software, for instance, we could do this easily, we just mark it as an option and doesn't need much of work (attached). are the developer of the AutoCAD more a ware for the needs of the users than the MS Word developers? we are talking here about the same feature (updating fields). what takes ages in MS Word can be implemented in one click in the AutoCAD. Well, Word and AutoCAD are different, but as a user, when i compare the power of the same feature in these two software, i could guess which one is more efficient. many thanks Jamal |
|
|
|
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 |