Microsoft KB Archive/192072

= WD2000: Documents Will Not Print Until Macro Ends =

Article ID: 192072

Article Last Modified on 12/6/2000

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q192072





SYMPTOMS
When you use a Visual Basic for Applications macro that prints 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.



WORKAROUND
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:

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: kbbug kbnofix KB192072

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.