Attach different template in a vba program?

K

keith brickey

Is there a way to change to a different template and activate Update styles
from a vba program?

Thanks,

Keith
 
C

Charles Kenyon

Yes.

Here's some code from one of my macros that should give you a start.

With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = sTemplatesPath & sTemplateName
.UpdateStylesOnOpen = False
.AttachedTemplate = sTemplatesPath & sTemplateName
End With

This attaches the template (described in the variables) updates the styles
and then turns off the updating of styles.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top