Gd morning,
I've created a macro to use on a template. Is there any way to extract that macro and apply it on a list of MS Word files ?
Thank you.
Gd morning,
I've created a macro to use on a template. Is there any way to extract that macro and apply it on a list of MS Word files ?
Thank you.
If the macro is in a template, it is automatically available to all files based on that template, provided you don't move the files to a location from which they can't access the template (e.g. a different system). Even if you move the document to another system, copying the template to the appropriate location on that system restores the functionality. There is usually no need to move the macros into the document. Indeed, doing so can break some macros.
Cheers
Paul Edstein
[Fmr MS MVP - Word]
If you want to run the macro on a batch of files then to make batch processing a relatively simple task, together with Greg Maxey (who also contributes here) I have developed a Word add-in to handle the document processing. This can be used with used with your own code subject to a couple of provisos that are show on the web page. You will find the item on my web site (link in the sig) listed as Batch Process Documents.
Without seeing your macro code, it is impossible to judge what changes need to be made to it to enable it to be run from that batch processor.
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com