Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-09-2012, 07:14 AM
tinfanide tinfanide is offline Losing VBA codes in .dotm Windows 7 64bit Losing VBA codes in .dotm Office 2010 32bit
Expert
Losing VBA codes in .dotm
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default How do I save VBA codes in .dotm files?

Quote:
Originally Posted by tinfanide View Post
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?
Reply With Quote
 

Tags
dotm

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Losing VBA codes in .dotm New template/New normal.dotm kenglade Word 3 12-19-2011 04:00 PM
Losing VBA codes in .dotm How to get to normal.dotm Aiken_Bob Word 4 05-02-2011 02:41 PM
How to use .dotm template extension in MS Word? dude444 Word 0 09-20-2010 09:34 AM
template dotm unable to load in word 2003 dude444 Word 0 09-16-2010 02:13 PM
Losing VBA codes in .dotm Word 2007 crashes due to corrupt normal.dotm stevebond001 Word 1 05-11-2010 10:49 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft