P
Patricia Shannon
I am using Word 2003.
I have created a macro that gets the filename beginning with the
server/sharename, using the ShareName Property.
It stores it in a document variable. I can then put it in the document,
eg., the footer. (The built-in filename path returns the mapped drive, eg. I:
We want \\ServerName\ShareName )
I have put this macro in the template for these files. I also put a
document_open event macro in ThisDocument of the template.
That is working fine. So I am set up for the existing documents.
But I am having a problem with new documents, or those created with SaveAs.
The filename does not exist until after the new file is saved. For SaveAs,
the filename before the save is the old one.
What is the best way to handle this? If there were an AfterSave event, it
would make things much easier.
Do I have to create my own macros for FileClose, Filesave, FileSaveAs, and
FileSaveAll, and do all that file dialog stuff?
I believe (hope) I can put these in the template, also.
Looking at the Help for "Using Events with the Application Object", I see I
have to Initialize the Declared Object.
It looks as if I can run this one time, and it make the required connections
so things will work when I create, open, and close documents. Or do I
misunderstand this.
I have created a macro that gets the filename beginning with the
server/sharename, using the ShareName Property.
It stores it in a document variable. I can then put it in the document,
eg., the footer. (The built-in filename path returns the mapped drive, eg. I:
We want \\ServerName\ShareName )
I have put this macro in the template for these files. I also put a
document_open event macro in ThisDocument of the template.
That is working fine. So I am set up for the existing documents.
But I am having a problem with new documents, or those created with SaveAs.
The filename does not exist until after the new file is saved. For SaveAs,
the filename before the save is the old one.
What is the best way to handle this? If there were an AfterSave event, it
would make things much easier.
Do I have to create my own macros for FileClose, Filesave, FileSaveAs, and
FileSaveAll, and do all that file dialog stuff?
I believe (hope) I can put these in the template, also.
Looking at the Help for "Using Events with the Application Object", I see I
have to Initialize the Declared Object.
It looks as if I can run this one time, and it make the required connections
so things will work when I create, open, and close documents. Or do I
misunderstand this.