PDA

View Full Version : How to save a duplicate of a document and name the file?



DPI
09-17-2013, 08:37 PM
I am trying to find a way in WORD 2012, to automatically save a duplicate of a document to a specified location, when the user selects the menu 'save' or 'save as' function. Ideally this should be transparent to the user. But is not strictly necessary.

The document is a template, that users complete and then save.

Additionally, is it possible to generate a file name from specific required fields in the document. Trying to get the users to stick to a naming strategy is like trying to herd cats.

Any examples of this would help as I have not been able to find any. If it was excel I would have it covered. But word is another matter.

I understand that the 'thisapplication.documentbeforesave' event would possibly do it, but I am looking for examples on how this is used.

Thanks.

mrojas
09-22-2013, 09:02 AM
You may want to consider adding a menu item that calls code to save the new document.

SamT
09-22-2013, 01:47 PM
Although you should keep your questions in your own thread, check out this thread for some ideas:

Saving Word file with Specific File Name from Content Control to PDF (http://www.vbaexpress.com/forum/showthread.php?47562-Saving-Word-file-with-Specific-File-Name-from-Content-Control-to-PDF)