wrong PDF output size with ExportAsFixedFormat in Excel VBA

前端 未结 4 586
轮回少年
轮回少年 2020-12-17 05:15

I use Excel 2010 with VBA.

I have the following code :

mySh.PageSetup.PaperSize = xlPaperLetter
mySh.ExportAsFixedFormat Type:=xlTypePDF, _
    Filen         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-17 05:29

    I set the print area where I wanted it: View-Page Break Preview. Then File-Print-Scaling = Fit Sheet on One Page Or File-Print-Page Setup-Fit to: 1 pages wide by 1 tall.

    Hope it helps someone.

提交回复
热议问题