DOCUMENT:Q192068 14-NOV-2000 [word97] TITLE :WD97: Documents Will Not Print Until Macro Ends PRODUCT :Word 97 for Windows PROD/VER:WINDOWS:97 OPER/SYS: KEYWORDS:kbdta ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Word 97 for Windows ------------------------------------------------------------------------------- SYMPTOMS ======== When you use a Visual Basic for Applications macro to print a document, the document will not start printing until the macro ends. CAUSE ===== Background printing is turned on. The default value for the Background printing method is True. RESOLUTION ========== You must set the Background printing option to False in your code. To do this, use the following macro: Sub PrintDoc() ActiveDocument.PrintOut Background:=False End Sub MORE INFORMATION ================ The following macro will give the command to print; however, the document will not actually print until you click OK in the message box. Sub PrintDoc() ActiveDocument.PrintOut Background:=True Msgbox "Test" End Sub The following macro will print the document before you click OK: Sub PrintDoc() ActiveDocument.PrintOut Background:=False Msgbox "Test" End Sub NOTE: If you do not specify a Background argument, it automatically assumes a True value. Additional query words: kbimu ====================================================================== Keywords : kbdta Technology : kbWordSearch kbWord97 kbWord97Search kbZNotKeyword2 Version : WINDOWS:97 Issue type : kbprb ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.