I have a Word 2002 macro called FileNew in a module called FileNew in my Startup template. It runs fine when I select New from the File menu, or when I press Ctrl+N. But the macro doesn’t run at all when I use the toolbar to create a new blank document, or when Word first starts up with a blank document. Is there another way to create a FileNew macro that will run in all four instances?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
File New Macro in Word 2002 (VBA Word 2002)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » File New Macro in Word 2002 (VBA Word 2002)
- This topic has 8 replies, 3 voices, and was last updated 21 years, 9 months ago.
AuthorTopicWSkarinathomas
AskWoody LoungerAugust 21, 2003 at 7:59 pm #392381Viewing 1 reply threadAuthorReplies-
WSHansV
AskWoody LoungerAugust 21, 2003 at 8:21 pm #704123The action of the “New” button on the toolbar is to open a new document based on Normal.dot, not to run the action of File | New… If you select Tools | Customize…, and activate the Commands tab, you will find both “New…” and ‘New’ in the File category. Remove the “New” button from the toolbar, and drag “New…” to its place.
I don’t know offhand how to make Word run the FileNew macro only if it isn’t started with a document. Putting FileNew in an AutoExec macro may have undesired side effects; I don’t know what your FileNew macro does.
-
WSjscher2000
AskWoody LoungerAugust 21, 2003 at 11:46 pm #704181First, it might be better not to name your module FileNew. If you ever add a MAIN procedure to that module, there could be a conflict with the procedure named FileNew. But this is just an aside…on to the main event.
The “new blank document” toolbar button runs FileNewDefault. Create a new procedure such as:
Sub FileNewDefault()
FileNew ‘call your macro
End SubWith respect to Word starting up, you would need to put an AutoNew macro in Normal.dot, I think, but I’m not sure that will do what you want. What does your FileNew macro do?
-
WSkarinathomas
AskWoody LoungerAugust 24, 2003 at 9:23 pm #704901My FileNew macro is quite simple really. I have 11 styles that we want to make ‘standard’ for all new documents. We already have a Startup template that performs many other functions, so we thought we could just add a FileNew macro to copy the styles into each new document. I have since decided FileNew is not the way to go, and have instead added an AutoExec macro to the Startup template which copies the desired styles from our standard styles template into the Normal.dot.
The only problem with this is that it doesn’t handle the first ‘Document 1’ that is created when Word starts up. I have found that the order of execution when Word starts is to create a new blank document based on the Normal.dot, then load the global (Startup) template, then run AutoExec macros in the global (Startup) template. We don’t want to push down a standard Normal.dot, we would rather just add to it from the Startup template. So, it seems one way or the other, that first document will not be affected. I have done what I consider to be a very clumsy fix, and that is, in the Startup template’s AutoExec macro, I have it close Document 1, then copy the styles to Normal.dot, then create a new blank document (which ends up being Document 2). It works, but I don’t particularly like users always starting Word on a Document 2 screen rather than Document 1.
Any other suggestions? Isn’t there a way to run a macro prior to Word creating Document 1? Possibly a switch or something at the Word startup?
-
WSHansV
AskWoody Lounger -
WSkarinathomas
AskWoody LoungerAugust 24, 2003 at 11:02 pm #704915Funny you should suggest that! Just after I posted my last reply I thought of that and was just coding it and testing it when I got your email! It works like a charm, thank you.
So, the AutoExec macro handles it so that the first document has the styles copied into it, and it copies the styles into Normal.dot so that all future blank documents have the styles.
The only loop hole then is if during that Word session the user modifies the styles and updates them to their Normal.dot, which would mean any new documents for that session would be using alternate styles (the AutoExec macro would handle that for the next Word session). I’m thinking, while not glamorous, I might still use a File New macro to handle this loop hole. A File, New macro could ensure that even if they did that, new documents created during that Word session would use the appropriate styles (by copying the styles to each new word document), and then when the next Word session is opened, the AutoExec macro would overwrite the Normal.dot. I would rather not run the code to copy the styles in a File, New macro, mainly because it is just extra overhead every time a new document is created, especially if the user hasn’t modified the Normal.dot. But, when I thought of doing something like comparing the styles in the new document with the ones in our ‘standard’ styles template each time a new blank document is created, well, that’s just as much overhead as the File, New approach!
Any suggestions there? I have the File, New working right now, but I’m just trying to find the ‘best’ way to handle this!
-
WSHansV
AskWoody Lounger -
WSkarinathomas
AskWoody LoungerAugust 25, 2003 at 6:55 am #704987While neither here nor there wrt the question posted, it’s not that we distrust the users. We are in a municipal government environment, and the powers that be have asked that each ‘new’ document start off with the recommended styles. From there, if necessary, of course the users can modify the styles to suit the individual document’s needs. If they routinely require a unique set of styles for a particular purpose, that is also accommodated through a process whereby they are provided with instructions on how they can develop their own template, or the IT department will even develop it for them. But, the object of the game, per what has been asked of us, it to ensure that all blank ‘new’ documents, not created from a template, always _start_ off with the standard recommended styles.
-
WSHansV
AskWoody LoungerAugust 25, 2003 at 7:18 am #704990Thanks for the explanation.
If you can’t enforce a standard Normal.dot, or copy the styles into Normal.dot when Word is started, I’d say copy the styles into each new document. I haven’t tested it, but testing the styles won’t be much more efficient, if at all, then just copying them.
There is one other problem: if the user right clicks in Windows Explorer, and selects New | Word Document, a copy is made of Winword8.doc in C:WindowsShellNew. The user can then double click this document, and you have no way to distinguish it from other existing documents. I assume that you don’t want to copy the styles into existing documents, so …
-
-
-
-
Viewing 1 reply thread -

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
-
Mozilla Firefox Security Updates! Released late 17th May 2025
by
Alex5723
4 hours, 7 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
1 hour ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
8 hours, 5 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
1 hour, 31 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
17 hours, 55 minutes ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
8 hours, 20 minutes ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
20 hours, 35 minutes ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
12 hours, 51 minutes ago -
Some advice for managing my wireless internet gateway
by
LHiggins
8 hours, 32 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
14 hours, 47 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 6 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 2 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
16 hours, 24 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
1 day, 20 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
3 hours, 59 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
7 hours, 39 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
1 day, 22 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
1 day, 22 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
1 day, 11 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
2 days, 6 hours ago -
0Patch, where to begin
by
cassel23
2 days ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
2 days, 20 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
2 days, 8 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 5 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
2 days, 20 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
2 days, 7 hours ago -
Installer program can’t read my registry
by
Peobody
35 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
2 days, 17 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
3 days, 1 hour ago -
False error message from eMClient
by
WSSebastian42
3 days, 16 hours ago
Recent blog posts
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.