Print entire workbook by default

zoneman

New Member
Joined
Mar 4, 2003
Messages
5
Hello everyone,
When Excel opens, by default, the Print Active Sheet option is bulleted.
Can someone tell me how to change this setting to Entire Workbook ?

Thanks !
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Not an answer as such, more a work around. I did this by recording a macro and putting it on a button on the tool bar which I use instead of the print button.
 
Upvote 0
Thanks.
I had thought about an auto_open macro and the print button replacement is a good idea. The actual problem is that a user of mine receives about 100 emails a day with 3 spreadsheets attached as part of her job. She would like to select all the emails and print them out with attachments included, however, some of the workbooks contain multiple sheets, and therefore, only the active sheet (the first sheet) will print.
I thought if there was a registry change I could make to force the print-entire-workbook-by-default option, then that would solve the problem of opening each email, then each spreadsheet, and selecting the print option, and then printing.

Is this possible ?
 
Upvote 0
You can use this code...


Sub test()

ActiveWorkbook.PrintOut Copies:=1, Collate:=True
End Sub
 
Upvote 0
It doesn't appear that there is a registry entry for this.

You could create a class module in the user's Personal.xls file (or in any hidden workbook stored in the user's XLStart folder)

You can find most of what you need here:
http://www.cpearson.com/excel/AppEvent.htm

Open the Visual Basic Editor in Excel by going to Tools -> Macro -> Visual Basic Editor. Locate VBAProject(Personal.xls) on the left side of the VB editor, click on it and then go to the Insert menu and choose Class Module and then paste the code below:

Option Explicit
Private Sub App_WorkbookBeforePrint(ByVal Wb As Workbook, Cancel As Boolean)
Application.EnableEvents = False
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
Application.EnableEvents = True
Cancel = True
End Sub

Then double-click on the ThisWorkBook module of VBAProject(Personal.xls) and paste this code:

Option Explicit

Dim AppClass As New EventClass

Private Sub Workbook_Open()
Set AppClass.App = Application

End Sub

Click on the Save button in the VB editor. Then close and relaunch Excel.
Note: This will force the printing of all worksheets all the time, even if the user chooses to print only a selected area or activeworksheet
 
Upvote 0
I found this post on Google and it is the only thing that comes even remotely close to answering my question! Is there a way to do the above within Excel 2010? I have 150-200+ Excel documents saved as email attachments in Outlook. It would be much easier if I could quick print the workbooks in their entirety, as opposed to opening each attachment, changing the options (again and again), then printing them all out.
 
Upvote 0
I found this post on Google and it is the only thing that comes even remotely close to answering my question! Is there a way to do the above within Excel 2010? I have 150-200+ Excel documents saved as email attachments in Outlook. It would be much easier if I could quick print the workbooks in their entirety, as opposed to opening each attachment, changing the options (again and again), then printing them all out.

I am looking for the same thing not looking for coding it. Just want to change the default in options but it doesn't seem to be something you can change easily. Microsoft should add it as a possible option
 
Upvote 0
I am looking for the same thing not looking for coding it. Just want to change the default in options but it doesn't seem to be something you can change easily. Microsoft should add it as a possible option

I know this is extremely old, but I am also in the same boat. I have document productions with XLS, XLSx, XLSm... in the thousands that I have to convert to PDF before numbering each page. Without a way to print the entire workbook by default, the only option is to open each file individually.

Did you ever get a resolution?

I'm getting errors with the VB DIM statement (It appears the EventClass is not a valid statement).
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,027
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top