wrong PDF output size with ExportAsFixedFormat in Excel VBA
I use Excel 2010 with VBA. I have the following code : mySh.PageSetup.PaperSize = xlPaperLetter mySh.ExportAsFixedFormat Type:=xlTypePDF, _ Filename:=filePathTmp, _ Quality:=xlQualityStandard, IncludeDocProperties:=False, _ IgnorePrintAreas:=False, OpenAfterPublish:=False It generates a PDF without error but the size is not correct. I get a 22.26 x 28.80 cm instead of the 21.59 x 27.94 cm that I would like to obtain. Any ideas ? Thanks for your help I use Excel 2010 and had this problem. I fixed it by changing the printer in Excel's dropdown list on the Print section of the File tab. My