View Single Post
 
Old 02-09-2015, 03:06 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could rename the macro 'FileSave' (and make a copy that's named 'FileSaveAs' - plus adding the necessary code to deploy the 'Save As' dialogue) to intercept Word's FileSave & FileSaveAs events, but more recent Word versions seem to be deprecating those. However, since the Document_Open event achieves much the same result for any document upon opening, I'd have thought that would be sufficient - the only thing it won't automatically update is the filename when a file is first created or re-saved via Save As, but it will capture that too, the next time the document is opened.

Although Word has 'DocumentBeforeSave' and 'DocumentBeforeClose' application events you could use, programming those is rather more complicated than using the built-in Document_Open event. To see what's involved, check out: http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote