ExcelNovice17
New Member
- Joined
- Apr 11, 2019
- Messages
- 7
Hi,
I am a novice in VBA but my work is demanding more and more. So my issue is that i am trying to save multiple worksheets in one PDF but when i open the PDF, the output is ignoring my customed print area. I wanted to know how can i deflect that so that both my printed hardcopy and my saved PDF come out the same. Below is my code for the save-to-pdf:
Sub Save()
Sheets(Array("worksheetA", "worksheetB", "worksheetC", "worksheetD", "worksheetE")).Select
Sheets("worksheetA").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("A12:C12"), Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=True, OpenAfterPublish:=True
End Sub
I am a novice in VBA but my work is demanding more and more. So my issue is that i am trying to save multiple worksheets in one PDF but when i open the PDF, the output is ignoring my customed print area. I wanted to know how can i deflect that so that both my printed hardcopy and my saved PDF come out the same. Below is my code for the save-to-pdf:
Sub Save()
Sheets(Array("worksheetA", "worksheetB", "worksheetC", "worksheetD", "worksheetE")).Select
Sheets("worksheetA").Activate
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Range("A12:C12"), Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=True, OpenAfterPublish:=True
End Sub