I have a .dot file stored in Word’s startup directory which contains a module with a sub called AutoExec which will not run automatically. Has there been a change in Word so that .dot files in the startup directory are not loaded when Word starts?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
AutoExec (Word 2003)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » AutoExec (Word 2003)
- This topic has 52 replies, 7 voices, and was last updated 21 years, 2 months ago.
AuthorTopicWSgellwood
AskWoody LoungerJanuary 6, 2004 at 8:10 pm #398736Viewing 4 reply threadsAuthorReplies-
WSjscher2000
AskWoody LoungerJanuary 6, 2004 at 9:28 pm #764724If AutoExec were not longer executed, it would break so many applications it wouldn’t be funny. On the other hand, the move toward having to “sign” projects could be affecting global add-ins. Couple things to check:
- When you start up Word, are there any command line switches (such as /a or /m) that could be interfering with its normal behavior?
- Are you trusting all installed add-ins and template? In Word 2002, this setting is under Tools>Macro>Security>Trusted Sources (tab). Does this make any difference?
Hope this helps. Please let us know for future reference..
-
WSgellwood
AskWoody LoungerJanuary 7, 2004 at 6:38 am #764860jsher and Andrew – thanks so much but still no joy. To avoid command line switches, I tried running Word from Word.exe in Windows Explorer with same result. Under Tools>Macro>Security>Trusted Publishers (tab) I have “Trust all installed addins and templates” checked ON. There is no other .dot file in C:Documents and SettingsApplication DataMicrosoftWordSTARTUP, and no other addins. Normal.dot has no code in it.
Arrrrggh
-
WSjscher2000
AskWoody LoungerJanuary 7, 2004 at 7:22 am #764872 -
WSgellwood
AskWoody Lounger -
Andrew Lockton
AskWoody_MVP -
WSgellwood
AskWoody Lounger -
WSjscher2000
AskWoody Lounger -
WSgellwood
AskWoody LoungerJanuary 7, 2004 at 10:16 pm #765171Hi jscher – Yes I need Autoexec because the idea is to create a global addin which, if loaded, will create a button that, when clicked, will run what we call our “namestamp” macro – just a simple little macro that puts the path and name of the document in the bottom left corner of the document. Then we’ll package it (I like your method of doing this which you explained in your “Deploying Word 2000 Templates ” post) and put it on our web site and do a marketing campaign featuring it as a free gizmo. I thought it was going to be easy – sheesh!
.
-
WSjscher2000
AskWoody LoungerJanuary 8, 2004 at 12:01 am #765248 -
WSgellwood
AskWoody Lounger -
WSjscher2000
AskWoody LoungerJanuary 8, 2004 at 10:55 pm #765794Yes, if I can do it, you can do it. It tooke me many hours to puzzle out how to use the convenient “designers” (like forms, their code is in a hidden code pane; right-click them in the Project Explorer and and View Code) and to set up event handlers, if needed, but the guts of the project are identical. Creating installers is a bit messy with the Packaging Wizard, but it’s the only thing I’ve used. There have been past posts here on recommendations for others (e.g., Wise, Installshield, etc.).
I found the online help on MSDN a bit sparse. The book “Office 2000 Visual Basic for Applications Fundamentals” was somewhat helpful. Mostly it was trial and error, and a few questions here in the Lounge.
By the way, I used Office Developer edition. There probably are some differences in the more general purpose VB editor in how you start up the project in the first place. MSDN probably covers that.
-
WSgellwood
AskWoody LoungerJanuary 9, 2004 at 5:59 am #765941Thank you for your words of encouragement.
Do you think that if I write a COM Addin, it is going to be really easy for the end user to install it? That is my chief concern – what if I go through the COM learning curve only to find that it’s still hard to deploy? I have a copy of Office developer edition i think. Thanks for reminding me that I can use it instead of VB. That would be more a more familiar environment than VB6. I’m somewhat disappointed to be going BACKWARDS as I was hoping to work in 2003 and use .NET, but what I read about creating a COM AddIn with .NET on MSDN was truly scary.
-
WSjscher2000
AskWoody LoungerJanuary 9, 2004 at 6:03 am #765943Deployment of a COM Add-in is via a setup.exe file, so it’s a no-brainer for the user. At least, in an ideal world. I had problems with my Outlook 2000/Windows 2000 add-in not working in Outlook 2002/Windows XP for no apparent reason. Something about different references, I guess, but I just recompiled on the new platform rather than trying to figure it out.
-
WSgellwood
AskWoody Lounger -
WSchrisgreaves
AskWoody LoungerJanuary 9, 2004 at 1:49 pm #766064…but see also this post.
I essayed with Utils.DLL a couple of years ago, but ultimately came back to Utils.dot for all my Word97SR2/VBA applications.
My main problem was with the installation of an upgraded DLL. The Word applications seemed to drop the reference and not pick up the new reference. Since most of my aps go out locked (so the user can mess up the code more than I have), I could find no easy way of resetting the reference to the new DLL.
I’m back distributing Utils.DOT with my applications.
If you solve the reference problem, please let me know. A utils.DLL would be of use to me in my VB6 projects.
-
WSchrisgreaves
AskWoody LoungerJanuary 9, 2004 at 1:49 pm #766065…but see also this post.
I essayed with Utils.DLL a couple of years ago, but ultimately came back to Utils.dot for all my Word97SR2/VBA applications.
My main problem was with the installation of an upgraded DLL. The Word applications seemed to drop the reference and not pick up the new reference. Since most of my aps go out locked (so the user can mess up the code more than I have), I could find no easy way of resetting the reference to the new DLL.
I’m back distributing Utils.DOT with my applications.
If you solve the reference problem, please let me know. A utils.DLL would be of use to me in my VB6 projects.
-
WSwmfay1
AskWoody LoungerJanuary 10, 2004 at 5:18 am #766333Are you sure you have checked Tools, Macro, Security… If it is set High, either set it to Med or Low, or you can always Self-certify. And.. Check the Trusted Sources tab. Trust all Add-ins and templates should be checked. Sorry, havent read this whole thread, it seems to have gone wandering, but the problem is MS has progressively disabled all code since Office 97. We use Security level Med and have started self-certifying with “DeleteThisAndDie”. In reality, abandon all hope. Every 18 months the rug is going to be pulled out from under you.
-
WSgellwood
AskWoody LoungerJanuary 12, 2004 at 7:00 pm #766990Omigawd!
I came back after the weekend and the darn thing works! Could it be I just had to reboot? I swear nothing else has changed. The .dot file is in C:Documents and Settings[Username]Application DataMicrosoftWordSTARTUP, it has a module called “AutoExec” with a subroutine called “Main” and another called “AutoExit”. They are both executing!
-
WSHoward Kaikow
AskWoody Lounger -
WSgellwood
AskWoody Lounger -
WSgellwood
AskWoody Lounger -
WSHoward Kaikow
AskWoody Lounger -
WSgellwood
AskWoody LoungerJanuary 12, 2004 at 7:00 pm #766991Omigawd!
I came back after the weekend and the darn thing works! Could it be I just had to reboot? I swear nothing else has changed. The .dot file is in C:Documents and Settings[Username]Application DataMicrosoftWordSTARTUP, it has a module called “AutoExec” with a subroutine called “Main” and another called “AutoExit”. They are both executing!
-
WSwmfay1
AskWoody LoungerJanuary 10, 2004 at 5:18 am #766334Are you sure you have checked Tools, Macro, Security… If it is set High, either set it to Med or Low, or you can always Self-certify. And.. Check the Trusted Sources tab. Trust all Add-ins and templates should be checked. Sorry, havent read this whole thread, it seems to have gone wandering, but the problem is MS has progressively disabled all code since Office 97. We use Security level Med and have started self-certifying with “DeleteThisAndDie”. In reality, abandon all hope. Every 18 months the rug is going to be pulled out from under you.
-
WSjscher2000
AskWoody LoungerJanuary 9, 2004 at 6:03 am #765944Deployment of a COM Add-in is via a setup.exe file, so it’s a no-brainer for the user. At least, in an ideal world. I had problems with my Outlook 2000/Windows 2000 add-in not working in Outlook 2002/Windows XP for no apparent reason. Something about different references, I guess, but I just recompiled on the new platform rather than trying to figure it out.
-
WSgellwood
AskWoody LoungerJanuary 9, 2004 at 5:59 am #765942Thank you for your words of encouragement.
Do you think that if I write a COM Addin, it is going to be really easy for the end user to install it? That is my chief concern – what if I go through the COM learning curve only to find that it’s still hard to deploy? I have a copy of Office developer edition i think. Thanks for reminding me that I can use it instead of VB. That would be more a more familiar environment than VB6. I’m somewhat disappointed to be going BACKWARDS as I was hoping to work in 2003 and use .NET, but what I read about creating a COM AddIn with .NET on MSDN was truly scary.
-
WSjscher2000
AskWoody LoungerJanuary 8, 2004 at 10:55 pm #765795Yes, if I can do it, you can do it. It tooke me many hours to puzzle out how to use the convenient “designers” (like forms, their code is in a hidden code pane; right-click them in the Project Explorer and and View Code) and to set up event handlers, if needed, but the guts of the project are identical. Creating installers is a bit messy with the Packaging Wizard, but it’s the only thing I’ve used. There have been past posts here on recommendations for others (e.g., Wise, Installshield, etc.).
I found the online help on MSDN a bit sparse. The book “Office 2000 Visual Basic for Applications Fundamentals” was somewhat helpful. Mostly it was trial and error, and a few questions here in the Lounge.
By the way, I used Office Developer edition. There probably are some differences in the more general purpose VB editor in how you start up the project in the first place. MSDN probably covers that.
-
WSgellwood
AskWoody Lounger -
WSjscher2000
AskWoody LoungerJanuary 8, 2004 at 12:01 am #765249 -
WSJanB
AskWoody LoungerJanuary 8, 2004 at 7:45 am #765403 -
WSgellwood
AskWoody Lounger -
WSJanB
AskWoody LoungerJanuary 9, 2004 at 9:35 am #765996(Edited by HansV to correct typo in first path and to generalize second path)
> Jan – It didn’t work in Word 2003 but worked fine on an earlier version of Word.
I use Windows XP Pro and Office 2003, both Dutch versions, and my solution works fine on my PC.
I did a little testing and found out that there are 2 Startup directories:
1. C:Program FilesMicrosoft Office 2003OFFICE11STARTUP
2. C:Documents and SettingsApplication DataMicrosoftWordSTARTUPIf the add-in containing module AutoExec with Sub Main is placed in 1 (and Options | File locations is pointing to it) then all works fine, no questions asked. This is the path I actually use. But if I place the add-in in 2 and change Options | File locations to that directory, I get a dialog panel asking if I want the macro’s to run or not. Macro security is normally set to Average on my PC. And if I place the add-in in 1 and Options | File locations points to 2, then I also get the macro security dialog panel. And after granting permission, the code in Sub Main runs…!
So if your add-in is located in 2, you can give relocating it to 1 a try.
Good luck
Jan -
WSgellwood
AskWoody Lounger -
WSgellwood
AskWoody Lounger -
WSJanB
AskWoody LoungerJanuary 9, 2004 at 9:35 am #765997(Edited by HansV to correct typo in first path and to generalize second path)
> Jan – It didn’t work in Word 2003 but worked fine on an earlier version of Word.
I use Windows XP Pro and Office 2003, both Dutch versions, and my solution works fine on my PC.
I did a little testing and found out that there are 2 Startup directories:
1. C:Program FilesMicrosoft Office 2003OFFICE11STARTUP
2. C:Documents and SettingsApplication DataMicrosoftWordSTARTUPIf the add-in containing module AutoExec with Sub Main is placed in 1 (and Options | File locations is pointing to it) then all works fine, no questions asked. This is the path I actually use. But if I place the add-in in 2 and change Options | File locations to that directory, I get a dialog panel asking if I want the macro’s to run or not. Macro security is normally set to Average on my PC. And if I place the add-in in 1 and Options | File locations points to 2, then I also get the macro security dialog panel. And after granting permission, the code in Sub Main runs…!
So if your add-in is located in 2, you can give relocating it to 1 a try.
Good luck
Jan -
WSgellwood
AskWoody Lounger -
WSJanB
AskWoody LoungerJanuary 8, 2004 at 7:45 am #765404 -
WSgellwood
AskWoody LoungerJanuary 7, 2004 at 10:16 pm #765172Hi jscher – Yes I need Autoexec because the idea is to create a global addin which, if loaded, will create a button that, when clicked, will run what we call our “namestamp” macro – just a simple little macro that puts the path and name of the document in the bottom left corner of the document. Then we’ll package it (I like your method of doing this which you explained in your “Deploying Word 2000 Templates ” post) and put it on our web site and do a marketing campaign featuring it as a free gizmo. I thought it was going to be easy – sheesh!
.
-
WSjscher2000
AskWoody Lounger -
WSgellwood
AskWoody Lounger -
Andrew Lockton
AskWoody_MVP
-
-
WSgellwood
AskWoody Lounger
-
-
WSjscher2000
AskWoody LoungerJanuary 7, 2004 at 7:22 am #764873
-
-
WSgellwood
AskWoody LoungerJanuary 7, 2004 at 6:38 am #764861jsher and Andrew – thanks so much but still no joy. To avoid command line switches, I tried running Word from Word.exe in Windows Explorer with same result. Under Tools>Macro>Security>Trusted Publishers (tab) I have “Trust all installed addins and templates” checked ON. There is no other .dot file in C:Documents and SettingsApplication DataMicrosoftWordSTARTUP, and no other addins. Normal.dot has no code in it.
Arrrrggh
-
-
Andrew Lockton
AskWoody_MVPJanuary 6, 2004 at 11:29 pm #764776I don’t have Word 2003 but could it be a naming conflict with another AutoExec macro somewhere? The online help for Word 2002 has this to say…
In the case of a naming conflict (multiple auto macros with the same name), Word runs the auto macro stored in the closest context. For example, if you create an AutoClose macro in a document and the attached template, only the auto macro stored in the document will execute. If you create an AutoNew macro in the normal template, the macro will run if a macro named AutoNew doesn’t exist in the document or the attached template.
-
WSgellwood
AskWoody LoungerJanuary 7, 2004 at 6:57 am #764864I tried putting an AutoExec() sub in Normal.dot and it also did not execute. I tried an AutoNew sub and, grrrrrr, it worked – but I need an AutoExec sub because I want to do something everytime Word opens for every document. I set my macro security from High to Medium – no joy.
What am I doing wrong?
-
WSgellwood
AskWoody LoungerJanuary 7, 2004 at 6:57 am #764865I tried putting an AutoExec() sub in Normal.dot and it also did not execute. I tried an AutoNew sub and, grrrrrr, it worked – but I need an AutoExec sub because I want to do something everytime Word opens for every document. I set my macro security from High to Medium – no joy.
What am I doing wrong?
-
-
Andrew Lockton
AskWoody_MVPJanuary 6, 2004 at 11:29 pm #764777I don’t have Word 2003 but could it be a naming conflict with another AutoExec macro somewhere? The online help for Word 2002 has this to say…
In the case of a naming conflict (multiple auto macros with the same name), Word runs the auto macro stored in the closest context. For example, if you create an AutoClose macro in a document and the attached template, only the auto macro stored in the document will execute. If you create an AutoNew macro in the normal template, the macro will run if a macro named AutoNew doesn’t exist in the document or the attached template.
-
WSHoward Kaikow
AskWoody Lounger -
WSgellwood
AskWoody Lounger -
WSgellwood
AskWoody Lounger
-
-
WSHoward Kaikow
AskWoody Lounger
Viewing 4 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
MS-DEFCON 2: Seven months and counting
by
Susan Bradley
11 minutes ago -
My 3 monitors go black & then the Taskbar is moved to center monitor
by
saturn2233
9 hours, 43 minutes ago -
Apple backports fixes
by
Susan Bradley
14 minutes ago -
Win 11 24H2 will not install
by
Michael1950
9 hours, 56 minutes ago -
Advice to convert MBR to GPT and install Windows 11 Pro on unsupported PC
by
Andy M
9 hours, 27 minutes ago -
Photos from iPhone to Win 10 duplicating/reformatting to .mov
by
J9438
11 hours, 35 minutes ago -
Thunderbird in trouble. Here comes Thundermail
by
Alex5723
9 hours, 44 minutes ago -
Get back ” Open With” in context menus
by
CWBillow
22 hours, 37 minutes ago -
Many AMD Ryzen 9800X3D on ASRock have died
by
Alex5723
1 day, 2 hours ago -
simple general stupid question
by
WSaltamirano
20 hours, 24 minutes ago -
April 2025 Office non-Security updates
by
PKCano
1 day, 13 hours ago -
Microsoft wants to hear from you
by
Will Fastie
13 hours, 31 minutes ago -
Windows 11 Insider Preview Build 22635.5160 (23H2) released to BETA
by
joep517
1 day, 16 hours ago -
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
1 day, 22 hours ago -
Test post
by
Susan Bradley
2 days ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
2 days, 2 hours ago -
SSD shuts down on its own
by
CWBillow
1 day, 17 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 10 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 12 hours ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
1 day, 12 hours ago -
Today is world backup day
by
Alex5723
2 days, 4 hours ago -
Windows .exe on Mint
by
Slowpoke47
9 hours, 10 minutes ago -
Reviewing your licensing options
by
Susan Bradley
10 hours, 4 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
1 day, 9 hours ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
1 day, 5 hours ago -
Making sense of Settings in Windows 11
by
Simon Bisson
1 day, 6 hours ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
2 days, 10 hours ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
2 days, 8 hours ago -
YouTube Ad Blocker Blocker
by
bbearren
2 days, 8 hours ago -
Obscure historical facts about Windows
by
Cybertooth
2 days, 9 hours ago
Recent blog posts
- MS-DEFCON 2: Seven months and counting
- Apple backports fixes
- April 2025 Office non-Security updates
- Microsoft wants to hear from you
- Reviewing your licensing options
- Apple has been analyzing your photos since September 2024
- What Windows 11 24H2 offers beyond bugs
- Making sense of Settings in Windows 11
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.