Hi everyone,
I'm trying to create a single .pdf file from multiple sheets of a workbook. But the result is a .pdf file with two blank pages.
I cannot find a solution for this problem. I tried also to create a new workbook with the selected sheets and to print the whole workbook. This didn't work either.
Hope somebody knows a answer to this problem.
Thanks
I'm trying to create a single .pdf file from multiple sheets of a workbook. But the result is a .pdf file with two blank pages.
Code:
ThisWorkbook.Sheets(Array("Sheet1", "Sheet2")).Select
Selection.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="C:\User\Desktop\TestFolder\test.pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
ThisWorkbook.Sheets("Sheet1").Activate
I cannot find a solution for this problem. I tried also to create a new workbook with the selected sheets and to print the whole workbook. This didn't work either.
Hope somebody knows a answer to this problem.
Thanks