Quote:
Originally Posted by smndnm
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