Sub SavetoPDF()
Application.ScreenUpdating = False
Dim UseName As Variant
Dim printRanges As Range
UseName = Application.GetSaveAsFilename( _
InitialFileName:="Report.pdf", _
FileFilter:="PDF files, *.pdf", _
Title:="Export to pdf")
Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=UseName, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
1条答案
按热度按时间mbzjlibv1#
保存为PDF
快速修复