Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
nic
 
Posts: n/a
Default How do I get a Macro to run immediately after a save as?

I have created a Macro for a filename and path in the footer of my Word
template, but now, I would like to get it to run automatically after "save
as" is used, so that the filename and path regenerates to pick up the newest
file name and location.

Thanks,

Nic
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default How do I get a Macro to run immediately after a save as?

Hi ?B?bmlj?=,

I have created a Macro for a filename and path in the footer of my Word
template, but now, I would like to get it to run automatically after "save
as" is used, so that the filename and path regenerates to pick up the newest
file name and location.

Create a macro named FileSaveAs so that it will execute when the user picks
this command.

Display the dialog box in the macro; when the user dismisses it, call your code
to write the file name and path, as you do now. Something like this:

Sub FileSaveAs()
Dialogs(wdDialogFileSaveAs).Show
MySubNameHere
End Sub

Sub MySubNameHere()
'your code to write the filename
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to Save Doc Aurora Formatting Long Documents 3 April 23rd 05 01:44 PM
How do I use macro/ other feature of word to save a new copy word Random New Users 4 March 24th 05 12:23 PM
How do use macro or some other feature to save a new copy of word. Random Microsoft Word Help 1 March 23rd 05 03:49 PM
macro to save rtf file as txt reballdad Microsoft Word Help 1 December 20th 04 10:17 PM
Save As is not working due to macro security settings Craig Meritz Microsoft Word Help 1 December 16th 04 03:53 AM


All times are GMT +1. The time now is 02:24 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"