Sets paper size.
Excel does not use the paper size setting from printer driver. If you need to change the paper size, use this property instead. Do not use PRN_MSO_PAPER_CUSTOM since it is not supported by ExcelPrintJob object.
Set oPrinter = CreateObject("easyPDF.Printer.8") Set oPrintJob = oPrinter.ExcelPrintJob oPrintJob.PaperSize = PRN_MSO_PAPER_A4 oPrintJob.PrintOut "C:\test\input.xls", "C:\test\output.pdf"