Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Printing and Exiting Word in a Macro.
by Allen Wyatt
(last updated January 19, 2017)
Robert needs a macro that will load a document, print it out, and then exit Word. He's figured out how to load the document and start to print it, but when he tells the macro to exit Word, he sees a message saying that if he quits, any printing will be deleted.
This message is displayed because the default method for printing in Word is to print in the background, which means that the command to shut down Word is executed while the printing is still going on in the background. The solution is to make sure that background printing is turned off in the print command:
Since printing will be done in the "foreground," the next macro command will not be executed until the printout is complete. In this way, the printing is very much like printing from within Windows itself: right-click a document and choose Print from the Context menu, and Word is loaded, the document printed, and Word then shuts down.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (450) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Printing and Exiting Word in a Macro.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!
When you add full-page borders to your document, you may be bothered to find out that one or more sides of the border don't ...Discover More
Imagine that you go to print your document, and all the text you can see on the screen just isn't there on the ...Discover More
When you create custom shortcut keys in Word, you may (at some point) want to get a printout of what those key assignments ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.