Convert mutiple ranges to one PDF document

Access Beginner

Active Member
Joined
Nov 8, 2010
Messages
311
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I am attempting to convert multiple ranges from different sheets to one PDF document. I have recorded a macro so it convert 2 ranges from 2 different sheets, into 2 PDFs. But I do not know how to change this code to get both ranges into the 1 PDF document. Not sure if it can even be done. The company that I work for does not allow the purchasing of programs nor add-ins, that may accomplish this either.

Code:
Sub pdf_convert_test()
'
' pdf_convert_test Macro
'
'
    Sheets("Remoteness Sheet").Select
    Range("A3:V105").Select
    Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "P:\Data\Customer populations\pdf test1.pdf", Quality:=xlQualityStandard _
        , IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
        True
    Sheets("Area Data").Select
    Range("A3:S135").Select
    Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
        "P:\Data\Customer populations\pdf test2.pdf", Quality:=xlQualityStandard _
        , IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
        True
End Sub

Excel 2007

Cheers
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Would this work for you?

1. Have an extra 'report' worksheet especially for this.
Then have your macro ..
2. Clear this 'report' sheet.
3. Copy each of the 3 ranges to the 'report' sheet.
4. Convert the 'report' sheet to a pdf.
 
Upvote 0
Would this work for you?

1. Have an extra 'report' worksheet especially for this.
Then have your macro ..
2. Clear this 'report' sheet.
3. Copy each of the 3 ranges to the 'report' sheet.
4. Convert the 'report' sheet to a pdf.

Sorry for the delay in responding.

Yes this works, thanks for the suggestion.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,763
Members
452,940
Latest member
rootytrip

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