![]() |
#1
|
|||
|
|||
![]()
Need help with this issue. We use a macro to automatically update fields in our documents. It works great except when you open a second document then the update fails and I get "Error! Not a valid file name" in the field. This failure happens 98% of the time, but sometimes it doesn't.
![]() If I open the second file by itself the macro works fine. ![]() This is the macro that I downloaded to update the fields upon opening the files: Sub Document_Open() Dim aStory As Range Dim aField As Field For Each aStory In ActiveDocument.StoryRanges For Each aField In aStory.Fields aField.Update Next aField Next aStory End Sub Our typical field is as follows: {INCLUDETEXT "spec project info.docx" projheader} Any ideas? |
Tags |
fields, macro, update |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2002 duplicating updated calendar events | RMTony | Outlook | 0 | 12-29-2010 11:48 AM |
![]() |
warakawa | Outlook | 1 | 10-04-2010 11:27 PM |
VBA to update certain (but not all) fields | sparkyrose | Word VBA | 0 | 05-20-2010 12:50 PM |
editable fields only | kingevil | Word | 0 | 05-04-2008 01:07 PM |
![]() |
quince | Office | 1 | 11-14-2005 07:28 PM |