Microsoft KB Archive/304645

= BUG: Word Ignores Pages Per Sheet Setting when Printing from wdDialogFilePrint Dialog Object =

PSS ID Number: 304645

Article Last Modified on 9/13/2001

-

The information in this article applies to:


 * Microsoft Word 2002
 * Microsoft Word 2000

-



This article was previously published under Q304645



SYMPTOMS
When you use the Show or Execute methods to programmatically display the Word Print dialog box (wdDialogFilePrint), and you then change the Pages per Sheet setting, the change is ignored and one page per sheet is always printed in the actual output. This problem does not occur if you use the Print command from the File menu to show the dialog box manually.



RESOLUTION
To work around this problem, use the following code to simulate selecting the Print command from the File menu: Sub TestPrint Application.CommandBars(&quot;Menu Bar&quot;) _ .Controls(&quot;&File&quot;).Controls(&quot;&Print...&quot;).Execute End Sub



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 In Word, create a new document. In the new document, type some text, insert a page break, and then type some more text.  Press ALT+F11 to open the Visual Basic for Applications (VBA) editor. In the code window for ThisDocument, add the following: Sub TestPrint Application.Dialogs(wdDialogFilePrint).Show End Sub  Switch back to the Word document and press ALT+F8 to open the Macros dialog box. In the list of macros, select TestPrint and click Run. The Print dialog box opens. Change the Zoom setting to print 2 pages per sheet. Click OK to start printing. Note that the print job ignores the setting that you just made, and prints each page on its own sheet.</li></ol>

Additional query words: zoom

Keywords: kbAutomation kbbug KB304645

Technology: kbWord2000 kbWord2000Search kbWord2002 kbWord2002Search kbWordSearch kbZNotKeyword2

-

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

© 2003 Microsoft Corporation. All rights reserved.