Marking Templates as Save

D

Dunedin397

Hello Everyone,

I'm working with an application that uses Word 2003 to edit letter templates
and also to mail merge to them.

However on closing the Word 2003 process, the following message is shown:

Do you want to save the changes to Word2003Code.dot

Word2003Code.dot is the name of the add-in used to store the code for the
custom toolbar.

Both Word 2000 and Word 2003 do not display this behaviour but even though
the code marks the template attached to the various documents as saved, the
message is still shown. Excerpts from the code used to set the attached
template as saved are shown below:


'----+ Prevent the translation of toolbar tips marking the add-in as dirty
'-- Note that (a) addins don't have a save method, but they also appear in
'-- the template collection that does and (b) the presence of "ghost"
templates
'-- could cause multiple matches so we don't exit after the first match
For Each oAddIn In AddIns
If oAddIn.Name = conThisAddIn Then
Templates(oAddIn.Path & "\" & oAddIn.Name).Saved = True
End If

Next

....


NormalTemplate.Saved = True


....

oMergeDoc.AttachedTemplate.Saved = True
oMergeDoc.Close wdDoNotSaveChanges

....


oResultDoc.AttachedTemplate.Saved = True
oResultDoc.Close wdDoNotSaveChanges


Any help is appreciated as I'm not sure what to do next.

Cheers,

Dunedin397
 

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