prompting me to save document template

D

Daniel

can someone give me a snippet of code-I want to stop Word from prompting to save changes to my document template. I am generating a document off a custom template and there is a significant amount of vba code living in the template-not any in the actual document that is being created.
 
C

Charles Kenyon

First, try to design your code so that it doesn't make changes to your
template, or worse, to the user's normal.dot. Unless you are making changes
to the interface (menus, etc.) that are different each time you use your
template, make them once and save them in your template.

Then, at the end of code which does change the interface, insert the
following line:
ThisDocument.Saved = True

Note, "ThisDocument" not "ActiveDocument." This sets the saved status of
your template as "True."


Daniel said:
can someone give me a snippet of code-I want to stop Word from prompting
to save changes to my document template. I am generating a document off a
custom template and there is a significant amount of vba code living in the
template-not any in the actual document that is being created.
 

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