Microsoft KB Archive/100937

= Microsoft Knowledge Base =

Excel: How to Print the Workbook Contents Screen
Last reviewed: September 12, 1996

Article ID: Q100937

The information in this article applies to:


 * Microsoft Excel for Windows, versions 4.0 and 4.0a
 * Microsoft Excel for the Macintosh, version 4.0

SUMMARY
There is no feature in Microsoft Excel that will allow you to directly and automatically print the Workbook Contents screen. To do this, you can either take a "snapshot" of the screen and use a graphics program to edit and print the picture or use the macro provided below.

To copy a picture of the entire screen, follow the appropriate procedure below.

Microsoft Excel for Windows

 * 1) With the Workbook Contents screen active, press ALT+PRINT SCREEN.
 * 2) Start Paintbrush. (This program is located in Accessories group in Program Manager).
 * 3) From the Edit menu, choose Paste. The picture of the Workbook Contents screen should now be displayed in Paintbrush.
 * 4) Use the Scissors tool to select only the Workbook Contents portion of the picture.
 * 5) From the Edit menu, choose Copy.

To print the image, paste it into into a new Paintbrush document or into another Windows-based application and print it from there.

Microsoft Excel for the Macintosh
With the Workbook Contents screen active, press COMMAND+SHIFT+3.

When you press COMMAND+SHIFT+3, a graphics file is stored on your hard disk. This file will be called "Picture n" (where "n" is a number determined by the number of picture files you have stored on your hard disk). You can open this file in many programs that handle graphics (including TeachText).

Macro to Print the Contents of the Workbook
Microsoft provides macro examples 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 macro is provided 'as is' and Microsoft does not guarantee that the following code can be used in all situations. Microsoft does not support modifications of the code to suit customer requirements.

The macro below creates a new worksheet with a list of all documents contained in the workbook. This is equivalent to the Workbook Contents screen. The new worksheet can then be printed.

=SET.NAME("test",GET.WORKBOOK(1,"book1.xlw")) =NEW(1) =FOR("x",1,COLUMNS(test)) =FORMULA(INDEX(test,1,x),OFFSET(!A1,x-1,0)) =NEXT =COLUMN.WIDTH(,,,3) =RETURN The first line ("=SET.NAME...") must be entered as an array function: in Microsoft Excel for Windows, press CTRL + SHIFT + ENTER to do this. In Microsoft Excel for the Macintosh, press COMMAND + RETURN.