How to update links automatically

M

Mike Sisk

I have a document where I have linked, using the
insert|file|insert|inserst as link option, RTF files that
were produced in another application and sent to a
specific directory. Because of this method of linking the
files to the word document the auto link option is turned
off on all these files. The only way for my to update
them is to select each one of them, almost 40, and choose
the update now button in the edit|links screen. I would
like to automate this process but am having little
success. I have used the following code from help but
have had no success. Any help would be greatly
appreciated.

For Each afield In ActiveDocument.Field
If afield.LinkFormat.AutoUpdate = False _
Then afield.LinkFormat.Update
Next afield
 
M

macropod

Hi Mike,

Have you tried using ActiveDocument.Fields.Update to update the links? This
should work on anything in the main body of the document.

Cheers
 
M

Malcolm Smith

Bear in mind that any locked fields will have to be unlocked first and
also any fields in the footers will have to Updated in the footer object
as ActiveDocument.Fields.Update misses them out.

- Malc
 
Top