VBA code to change the attached template

B

BABs

I have a custom template that I use to create reports. It takes about 5
minutes to populate and open the document from the template. I have vba code
to update all fields and then unlink the fields, but when I have to reopen
the document, it takes another 5 minutes because it is still attached to
MY.dotm. Is there vba code for word to attach the normal.dot before saving?
Thx.
 
B

Beth Melton

BABs said:
I have a custom template that I use to create reports. It takes about 5
minutes to populate and open the document from the template. I have vba
code
to update all fields and then unlink the fields, but when I have to reopen
the document, it takes another 5 minutes because it is still attached to
MY.dotm. Is there vba code for word to attach the normal.dot before
saving?
Thx.

You can use the following to attach the document to the Normal template:

ActiveDocument.AttachedTemplate="normal.dotm"


~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP
https://mvp.support.microsoft.com/profile/Melton
What is a Microsoft MVP? http://mvp.support.microsoft.com/gp/mvpfaqs

Guides for the Office 2007 Interface:
http://office.microsoft.com/en-us/training/HA102295841033.aspx
 
Top