XL5NT: Can't Print Multiple Copies of a Document in Windows 95

Last reviewed: January 8, 1997
Article ID: Q136085
The information in this article applies to:
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Windows 95

SYMPTOMS

In Microsoft Windows 95, when you attempt to print multiple copies of a document in Microsoft Excel version 5.0 for Windows NT, only one copy of the document is printed.

CAUSE

This problem occurs because Microsoft Excel for Windows NT does not correctly use the Microsoft Windows 95 API that controls the number of copies that are printed during each print job.

WORKAROUND

Method 1: To work around this problem, use the following Visual Basic for

          applications code to print multiple copies.

          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. This Visual Basic procedure is provided 'as is' and
          Microsoft does not guarantee that it can be used in all
          situations. Microsoft does not support modifications of this
          procedure to suit customer requirements for a particular purpose.

          Sample Code
          -----------

          'A procedure to print multiple copies
          Sub Example()
             On Error GoTo PrintEmbeddedChart
             ' Dimension variables
             Dim Ncopies As Integer, Counter As Integer
             Ncopies = _
                Application.InputBox _
                ("Please enter number of copies to print: ", _
               "Print Multiple Copies", 1, , , , , 1)

             For Counter = 1 To Ncopies
                ActiveWindow.SelectedSheets.PrintOut Copies:=1
             Next
          Exit Sub

          'Error handler to print embedded charts PrintEmbeddedChart:
             For Counter = 1 To Ncopies
                ActiveChart.PrintOut Copies:=1
             Next
          End Sub

Method 2: To print multiple copies of a Microsoft Excel document from
          Microsoft Windows 95, use Microsoft Excel for Windows 95, version
          7.0.

MORE INFORMATION

There are only two API calls to print more than one copy from the printer in Microsoft Windows 95. An application written specifically to run under Microsoft Windows NT doesn't use either of these API calls. This functionality does work if you are using Microsoft Windows NT.


KBCategory: kbprint
KBSubcategory:

Additional reference words: 5.00 xlnt



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: January 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.