![]() |
|
#1
|
|||
|
|||
|
Hi
I have some VBA that opens all Word documents in a given folder, pastes their content into a blank template then saves with the original filename in a new folder. As part of this I want the filename field in the header of the new documents to automatically update with the document filename. I nknwo you can use F9 but I don't want this to be a task for the document users. I've seen some vba examples such as: Code:
Dim aStory As Range
Dim aField As Field
' Automatically update all fields in document when it is opened
For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory
I'd really appreciate any pointers on how to solve this, thanks. Last edited by macropod; 10-18-2012 at 02:33 PM. Reason: Added code tags & formatting |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| auto update slide on viewing | videoman | PowerPoint | 0 | 07-11-2012 06:29 AM |
| Table of Contents - Direct Field Implementation - Auto-Update Numbering | ztag | Word | 3 | 01-19-2012 03:04 PM |
Use a mail merge Field as the final doc filename
|
DaveBF | Mail Merge | 1 | 10-22-2011 10:16 PM |
| Auto Update the date. | Nirik | Excel | 16 | 12-16-2010 04:23 AM |
| Project Auto-Update | hB-sys | Project | 0 | 04-15-2010 06:46 AM |