I am trying to figure out what may be the issue on a second deployment machine that is causing the Global template (normal.dot) to lose its stored values.
This code works on a clean VM machine I have. Both machines are Windows XP with only Word 2000. It works as expected on the VM. On the other machine, there are other templates installed and in use I believe, and each of them references Normal.dot.
Each time the code below executes when a second document is opened, it still MsgBox’s ‘false’ because it doesn’t retain the started value.
What may be causing the Normal.dot to restart/lose its stored values? I think it may be because it’s using other templates also, but I don’t understand how they’re related.
Dim started As Boolean
Private Sub Document_Open()
MsgBox started
If Not started Then
started = True
End If
End Sub
Hmm for some reason I can’t comment to ask this question… Do any of the other templates have code running? And are you sure there’s only one normal.dot on that user’s machine?
I’d start with a thorough template search of the hard drive, and “disable” all found templates one by one by changing the file extension to something non-word. If you get down to no other templates and it’s still not firing, then you know they’re not responsible. (They shouldn’t be anyway, as a template is only loaded by a document, or by the user.)