Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Printing and Exiting Word in a Macro.
by Allen Wyatt
(last updated September 11, 2020)
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 (10778) applies to Microsoft Word 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Word 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 create custom shortcut keys in Word, you may (at some point) want to get a printout of what those key ...Discover More
Printing in duplex has not always been easy in Word, particularly when you want that printing to be controlled by a ...Discover More
You can instruct Word, when printing your document, to print only the odd- or even-numbered pages. This tip explains how ...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 ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.