Quote:
Originally Posted by tinfanide
I've a dotm file and add some codes.
Since I cannot upload a dotm file here, I have attached it in
http://www.box.com/s/4b7c859d87c60f20c609
Code:
Private Sub Document_Open()
MsgBox "open"
End Sub
But it does not trigger the codes.
|
Source:
http://www.box.com/s/4b7c859d87c60f20c609
Please take a look at the demo of the problem:
Demo:
http://youtu.be/scWAD2-heKg
Well, I've found that
the codes written there are run when I open a .docx file.
By then, I know how it works.
It works for a normal document (.doc, .docx).
It does not work for a template (.dotm).
But another question comes:
How do I save VBA codes in .dotm files?