Is anyone able to help with a macro in Word that's taken up way to much time.
I have a word doc that has multiple links to a excel file. I then want to save the word doc as a template. When the template is opened I want it to update the links then break them. I've set the links to manual update so that the user isn't asked to save twice when they use the template.
I can get the links to update using the first 2 lines of code but if I then try to update and break the links by adding the 3rd line, the update fails?
Any suggestions?
Thanks,
Ian

Private Sub Document_New()
MsgBox ("Process may take a few seconds.")
Selection.WholeStory
Selection.Fields.Update
Selection.Fields.Unlink
Selection.HomeKey
End Sub
I have a word doc that has multiple links to a excel file. I then want to save the word doc as a template. When the template is opened I want it to update the links then break them. I've set the links to manual update so that the user isn't asked to save twice when they use the template.
I can get the links to update using the first 2 lines of code but if I then try to update and break the links by adding the 3rd line, the update fails?
Any suggestions?
Thanks,
Ian

Private Sub Document_New()
MsgBox ("Process may take a few seconds.")
Selection.WholeStory
Selection.Fields.Update
Selection.Fields.Unlink
Selection.HomeKey
End Sub