Hi All
I have a problem where I need to export 3 worksheets as a single PDF file.
I had one doing it as 3 seperate PDF files, which is below:
As you can see from this, the second tab has
but the first tab has
It needs to be this way, otherwise the sheets don't line up properly.
I have got a macro for saving it as one PDF which is:
But because of only one Print Area declreation on of the sheets is coming up wrong.
I was looking to get a code where it saved the 3 seperate PDF's and then ran one combining them into one, however this document will be used by multiple people, and I don't want to run the risk of it going wrong across multiple machines.
Does anyone know of anything where you can save multiple sheets as a PDF but set the rule set for the sheets individually?
Thanks in advance
I have a problem where I need to export 3 worksheets as a single PDF file.
I had one doing it as 3 seperate PDF files, which is below:
Code:
Sheets("Campaign Summary").Select
pdfName = ActiveSheet.Name
ChDir ActiveWorkbook.Path & "\"
fileSaveName = ActiveSheet.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Sheets("Lead Listing").Select
pdfName = ActiveSheet.Name
ChDir ActiveWorkbook.Path & "\"
fileSaveName = ActiveSheet.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=True, OpenAfterPublish:=False
Sheets("Data Summary").Select
pdfName = ActiveSheet.Name
ChDir ActiveWorkbook.Path & "\"
fileSaveName = ActiveSheet.Name
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
MsgBox "File Saved " & " " & fileSaveName
As you can see from this, the second tab has
Code:
IgnorePrintArea:=True
Code:
IgnorePrintArea:=False
It needs to be this way, otherwise the sheets don't line up properly.
I have got a macro for saving it as one PDF which is:
Code:
ChDir ActiveWorkbook.Path & "\"fileSaveName = ActiveSheet.Name
ThisWorkbook.Sheets(Array("Campaign Summary", "Lead Listing", "Data Summary")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
fileSaveName, Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=True, OpenAfterPublish:=True
But because of only one Print Area declreation on of the sheets is coming up wrong.
I was looking to get a code where it saved the 3 seperate PDF's and then ran one combining them into one, however this document will be used by multiple people, and I don't want to run the risk of it going wrong across multiple machines.
Does anyone know of anything where you can save multiple sheets as a PDF but set the rule set for the sheets individually?
Thanks in advance