View Single Post
 
Old 07-08-2014, 02:50 AM
macropod's Avatar
macropod macropod is online now Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Quote:
Originally Posted by smndnm View Post
The macro works when run from within the whateveritscalled=AltF11 environment. But the workflow is still broken.
If you had added the macro to the document template's 'ThisDocument' code module, it would run immediately the document is created. As for Alt-F11, have you never used Alt-F8?
Quote:
The filename and filetype changes do not occur on clicking the save icon.
The macro has nothing to do with the normal Save or SaveAs processes. As coded, it handles all the name & type definitions with it's own call to the SaveAs process. If you wanted to employ the same process for a subsequent save, it's simply a matter of running the same macro again.
Quote:
While I understand the code I am looking at (or at least it makes sense). I don't get how or when it gets invoked or even how to make that happen on my say so.
It runs automatically and you can run it manually.
Quote:
From the XXX.dotm, when I open (double click) it to a document1.docx, this macro should be invoked upon clicking the Save icon, which would perform the filetype and filename and location changes, this part doesn't work... and I am completely clueless how to even begin looking at it.
because that's not how the macro works. If all you want is to intercept the SaveAs and Save commands, simply rename the macro:
FileSaveAs
and add another macro:
Code:
Sub FileSave
Call FileSaveAs
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote