Multiple Custom Views to Single PDF

Steims

New Member
Joined
Sep 27, 2013
Messages
1
I have a worksheet that I use to create a report each month. I have saved 6 custom views to print the various pages of the report, 3 custom views on one sheet and one on each of 3 other sheets.

To compile my report, I currently select each custom view, save as PDF, and then use adobe acrobat to combine the files. This is not a bad work around, but I would like to create a macro that would allow me to either save or print the custom views to a single PDF with the click of a button, which would make it easier for me to pass the responsibility for this report off to someone else more easily.

Any help would be appreciated. Thanks.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hello and welcome to the Board

See if this example is useful:

Code:
Sub Export_to_PDF()
Dim ws As Object
' tested with Excel 07


For Each ws In ActiveWorkbook.Sheets        ' hide unwanted sheets
    If ws.Name = "Draft" Then ws.Visible = False
Next


ActiveWorkbook.ExportAsFixedFormat xlTypePDF, _
ActiveWorkbook.Path & "\" & "Summary" & ".pdf"


End Sub
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,986
Members
452,541
Latest member
haasro02

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