PDA

View Full Version : Solved: Changing Templates



mdmackillop
03-28-2007, 09:05 AM
I have a number of Word templates. I'm looking to create mailmerge documents from these and include further automation.
I've created a new document based on the template, and made it mail merge, I've added a simple Document Open macro to run the code which is in my Normal.dot (at present), but this is not being found because (I think) the document is looking to the original template for the code.
Somehow, I need to remove this link. I can't just delete the template, which is stored on the server and still in use, until everything is up and running.
Pasting the document into a new document isn't working, as the font sizes are changing.
Any other ideas?

lucas
03-28-2007, 09:38 AM
What if you put the code in document new of the template so it would run when the template is cloned?

mdmackillop
03-28-2007, 09:53 AM
New documents will be created from the mailmerge document, so the templates all become superfluous.

lucas
03-28-2007, 09:59 AM
how about calling the sub in the normal.dot directly
Application.Run "'My Document.doc'!ThisModule.ThisProcedure"

mdmackillop
03-28-2007, 10:18 AM
Got it! :doh:
Copy the templates to my PC, create the new documents from the templates here, then delete them!

lucas
03-28-2007, 10:21 AM
Good deal Malcolm....thought I was going to be helpful there for a minute but probably didn't come up with anything you hadn't thought of:bow:

mdmackillop
03-28-2007, 10:38 AM
All ideas welcome. They help stimulate the thought process!