[RESOLVED] Remove Template/Macros
I have set up a Word template (.dot) file that presents the user with a form to enter relavent detail.
The macro then enters the text in the correct places in the new document that is created.
However, a link to the .dot file is still present and when someone else tries to open it they get the Disable/Enable macro warning.
If I delete/move the .dot file after the new document has been created, the normal template is used, which is fine as there is no special style/formatting in the .dot.
Is there any way to remove the reference to the initial template once the new file has been created?
Re: Remove Template/Macros
Do you actually delete the .DOT file or just delete what's in the Document Template field in Tools, Templates and Add-ins?
Re: Remove Template/Macros
At the moment, I just noticed that the .DOC file contains macros when the .DOT file is in its original location and it doesn't when the .DOT file is moved.
I want this template to be used by several people, so it isn't going to be deleted after I create the .DOC file.
I guess what I am looking for is a way to break the association to the .DOT file through code.
Re: Remove Template/Macros
This fixes it.
VB Code:
With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = ""
End With
Where was RobDog888 with this answer? :D :p