Hi there - Hope someone has an idea....
In the New document event of word I create a toolbar using code..... so this causes word to ask to save the template when you close it down. I cant change the toolbar code or even the event its happening in - What I've create now is a Addin with the following code:
Private Sub PsuedoAutoClose()
On Error GoTo err
ind = 1
If Word.Documents.Count > 0 Then
For ind = 1 To Word.Templates.Count
If ActiveDocument.AttachedTemplate = "Letter.dot" Or ActiveDocument.AttachedTemplate = "Fax.dot" Or ActiveDocument.AttachedTemplate = "Memo.dot" Then
Word.Templates(ind).Saved = True
End If
Next ind
End If
'If ActiveDocument.AttachedTemplate = "Letter.dot" Then Word.Templates(1).Saved = True
'If ActiveDocument.AttachedTemplate = "Fax.dot" Then Word.Templates(1).Saved = True
'If ActiveDocument.AttachedTemplate = "Memo.dot" Then Word.Templates(1).Saved = True
err:
Word.NormalTemplate.Saved = True
End Sub
but when i open a few templates simultaniosly this code doesn't run ..... any Idea on how I can force word NOT to save any template(And not to prompt to save)....
In the New document event of word I create a toolbar using code..... so this causes word to ask to save the template when you close it down. I cant change the toolbar code or even the event its happening in - What I've create now is a Addin with the following code:
Private Sub PsuedoAutoClose()
On Error GoTo err
ind = 1
If Word.Documents.Count > 0 Then
For ind = 1 To Word.Templates.Count
If ActiveDocument.AttachedTemplate = "Letter.dot" Or ActiveDocument.AttachedTemplate = "Fax.dot" Or ActiveDocument.AttachedTemplate = "Memo.dot" Then
Word.Templates(ind).Saved = True
End If
Next ind
End If
'If ActiveDocument.AttachedTemplate = "Letter.dot" Then Word.Templates(1).Saved = True
'If ActiveDocument.AttachedTemplate = "Fax.dot" Then Word.Templates(1).Saved = True
'If ActiveDocument.AttachedTemplate = "Memo.dot" Then Word.Templates(1).Saved = True
err:
Word.NormalTemplate.Saved = True
End Sub
but when i open a few templates simultaniosly this code doesn't run ..... any Idea on how I can force word NOT to save any template(And not to prompt to save)....