B
Beate
Hi,
the following Macro disables a menubar in a document, but not in a template
of the document. The problem is, always when the document is closed, a msg
box pops up asking if the user wants to save changes in the template. I would
like to prevent this msg box from popping up.
Does anyone know how to program this? With which command can I delete a
reference?
The code I have is the following:
Private Sub Document_Open()
Dim pruefe As Integer
pruefe = ActiveDocument.Variables.Item("DisableMenu")
If pruefe = "1" Then
'Dokument
'ActiveDocuments.Variables.Item("Template") = ""
ReadInData 'Function of no relevance
DisableMenu False
'CommandBars("File").Controls(5).Enabled = False
End If
End Sub
Thank you for your help.
the following Macro disables a menubar in a document, but not in a template
of the document. The problem is, always when the document is closed, a msg
box pops up asking if the user wants to save changes in the template. I would
like to prevent this msg box from popping up.
Does anyone know how to program this? With which command can I delete a
reference?
The code I have is the following:
Private Sub Document_Open()
Dim pruefe As Integer
pruefe = ActiveDocument.Variables.Item("DisableMenu")
If pruefe = "1" Then
'Dokument
'ActiveDocuments.Variables.Item("Template") = ""
ReadInData 'Function of no relevance
DisableMenu False
'CommandBars("File").Controls(5).Enabled = False
End If
End Sub
Thank you for your help.