View Single Post
 
Old 05-05-2011, 01:09 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Tom,

It seems to me you're not so much using this template to distribute macros as to create an altenative way of creating a new document based on a template. You could probably achieve much the same result using something based on:
Application.Dialogs(wdDialogFileNew).Show
from the users' Normal.dot(m) template.

Be that as it may, it might be useful if you can track down the point at which your global template's state is changing to unsaved. Here's some code to try:
Code:
Sub Test()
Dim Doc As Document
For Each Doc In Documents
  MsgBox Doc.AttachedTemplate.Name & vbTab & Doc.AttachedTemplate.Saved
Next
Dim Tmplt As Template
For Each Tmplt In Templates
  MsgBox Tmplt.Name & vbTab & Tmplt.Saved
Next
End Sub
If you load your template, then run the macro, it should tell you whether anything might need saving. If you then create a new document based on one of the other templates called by the code in your global template, and run the code again, it should tell you whether the global template's status has changed.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote