I have a VBA code in word document. The code runs each time the user clicks on save. The code works fine when the document type is Word Macro-Enabled Document but when I convert the document to Word Macro-Enabled Template the code stop working, any advise on how to fix this? Note: code is in the document itself
Private WithEvents App As Word.Application
Private Sub Document_Open()
Set App = Word.Application
End Sub
Private Sub App_DocumentBeforeSave(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
do stuff....