XL: How to Print all Documents in a Workbook

Last reviewed: February 2, 1998
Article ID: Q89753

The information in this article applies to:
  • Microsoft Excel for Windows, version 4.0
  • Microsoft Excel for the Macintosh, version 4.0

SUMMARY

In version 4.0 of Microsoft Excel, you can print all bound and unbound documents in a workbook in Group Edit mode or with a macro.

Note that this a built-in feature in Microsoft Excel version 5.0.

MORE INFORMATION

Workbooks in Microsoft Excel provide a convenient way to organize documents. The following information covers a couple of methods for printing all the documents in a workbook.

Printing Workbook Documents in Group Edit Mode

NOTE: Using this method you can specify which documents you want printed and even include documents that are not contained in your workbook.

To print workbook documents in Group Edit mode, follow these steps:

  1. Open your workbook and any additional documents you want to print.

  2. From the Options menu, choose Group Edit.

    NOTE: Switching to another document window while in Group Edit mode will end the group edit session.

  3. In the Group Edit dialog box, select the documents you want to print from the Select Group list.

    You can select multiple documents by holding down the CONTROL key (COMMAND on the Macintosh) while you click the document name. To cancel the selection of a document, hold down CONTROL (COMMAND on the Macintosh) and click the selected document name.

    To select a group of contiguous names in the list, select the first name, then hold down the SHIFT key and select the last name you want. All the names between these two in the list will be selected.

  4. Choose the OK button to return to Microsoft Excel in Group Edit mode.

  5. From the File menu, choose Print.

Microsoft Excel prints all the documents you have selected as your edit group. To exit Group Edit mode, switch to any document window other than the active window.

Printing Workbook Documents with a Macro

The following macro is an example of one way to automate the printing of all documents in a workbook.

To print all documents in a workbook with this macro, you must first open the Workbook Contents window and then run the macro.

   A1: PrintDocs                        B1: Comments
   A2: =GET.DOCUMENT(1)                 B2: Get workbook name
   A3: =ERROR(FALSE)                    B3:
   A4: =ACTIVATE.NEXT(A2)               B4: Get first document
   A5: =WHILE(NOT(GET.DOCUMENT(1)=A2))  B5: Repeat until Contents window
   A6: =  PRINT()                       B6: Print the document
   A7: =  ACTIVATE.NEXT(A2)             B7: Activate next document
   A8: =NEXT()
   A9: =RETURN()

REFERENCES

"Microsoft Excel User's Guide 1," version 4.0, pages 69, 383-389


Additional query words: 4.0 4.00 entire kbhowto
Keywords : kbprint
Version : WINDOWS: 4.0; MACINTOSH: 4.0
Platform : MACINTOSH WINDOWS
Issue type : kbhowto


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