I created a template with VBA code and userform. I saved it as .dotm (macro-enabled template).
I want to open the template, use the interface to make changes in the document and after that save the document as .docx without references to the template/code. When I open the docx and open the visual basic editor I find there the code.
This is my code to exit from the interface
Private Sub Sair_Click()
ActiveDocument.Bookmarks("NomeProj").Range.text = Nomeproj.Value
ActiveDocument.TablesOfContents(1).Update
Application.Quit
End Sub