XL5: PageSetup.Zoom Does Not Work with Some Printers

Last reviewed: May 27, 1997
Article ID: Q151312
5.00 5.00c WINDOWS kbprog kbusage

The information in this article applies to:

  • Microsoft Excel for Windows, versions 5.0, 5.0c

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.

CAUSE

The 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

STATUS

Microsoft 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 Language

To confirm if the active printer is a Postscript printer, follow these steps:

  1. In Microsoft Excel, with a worksheet active, click Page Setup on the File menu.

  2. Click the Options button and click the About button.

If the About dialog box lists a version for "Windows Postscript Printer Driver," then the printer is a Postscript printer.

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
KBSubcategory: xlwin

Additional reference words: 5.00 5.00a 5.00c
Keywords : xlwin
Version : 5.00 5.00c
Platform : WINDOWS


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.

Last reviewed: May 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.