View Single Post
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
mt_pelion mt_pelion is offline
external usenet poster
 
Posts: 3
Default Macro to Break Links to Excel in Document Header

I am using Word 2000 and Excel 2000.
I have created a Word file as a template file which uses links to an Excel
file to create a checklist with client date already on it. I have a macro
already in the document which does *almost* everything I need it to. Here is
my current macro:
Sub AutoOpen()
Selection.WholeStory
Selection.Fields.Unlink
Selection.HomeKey Unit:=wdStory
Application.Dialogs(wdDialogFileSaveAs).Show
End Sub

What is supposed to happen is this:
1. Open the Excel file and enter all the data in the highlighted fields.
2. Save the master excel file and close Excel.
3. Open the Word file.
4. The Word File will automatically update the links with the data, remove
the links, and load the Save As... screen.
5. Save the file to the client's folder and close Word.

Unfortunately, I have found that this does not remove links in the header of
the document. Links in the body are successfully removed, however. This, of
course, causes problems when the client's saved Word files are opened later
as the headers then automatically update to the most recent entries in the
master Excel file.

Can anyone tell me what I need to add or change in my macro to fix this?

Thanks!