XL5: PageSetup.Zoom Does Not Work with Some PrintersLast reviewed: May 27, 1997Article ID: Q151312 |
5.00 5.00c
WINDOWS
kbprog kbusage
The information in this article applies to:
SYMPTOMS In Microsoft Excel for Windows versions 5.0 and 5.0c, the Zoom property for the PageSetup object may not scale worksheets correctly. The Scaling setting may appear correctly in the Page Setup dialog box, but the actual scaling of the sheet does not occur until you click OK interactively from the Page Setup dialog box.
CAUSEThe Zoom property may not be set correctly if the active printer is a Postscript printer. WORKAROUND Using the Microsoft Excel 4.0 "PAGE.SETUP" macro function, you can set the print scaling correctly for the worksheet. The following macro demonstrates how to use this Microsoft Excel 4.0 macro function in a Visual Basic for Applications procedure. The following procedure will set the print scaling of the active worksheet at 25%. Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.
Sub Print_Scale() Application.ExecuteExcel4Macro "PAGE.SETUP(,,,,,,,,,,,,25)" End Sub STATUSMicrosoft has confirmed this to be a problem in the versions of Microsoft Excel mentioned at the beginning of this article. This problem no longer occurs in Microsoft Excel for Windows 95 version 7.0. MORE INFORMATION Your worksheet may not fit exactly on the number of pages you want. You can scale your printed work to fit on more or fewer pages than it would at normal size, or you can specify a certain number of pages for your printed worksheet. You can select both choices by clicking Page Setup on the File menu and setting the scaling on the Page tab. The Visual Basic property to set this is Zoom, and the Microsoft Excel 4.0 macro language command to set this is PAGE.SETUP. The Microsoft Excel 4.0 macro language commands can also be used in Visual Basic. For additional information, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q108032 TITLE : XL5:Visual Basic Equivalents for Macro Functions and Commands ARTICLE-ID: Q109976 TITLE : XL5: Visual Basic and the Excel Version 4.0 Macro LanguageTo confirm if the active printer is a Postscript printer, follow these steps:
REFERENCES Microsoft Excel, version 5.0, "Microsoft Excel User's Guide," Chapter 14, "Setting Up What to Print" For more information about the Zoom property in Microsoft Excel version 5.0, choose the Search button in Visual Basic Reference Help and type:
Zoom Property |
KBCategory: kbprog kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |