Save sheet as PDF (Macro)
The following Macro will allow you to save a specified sheet as a PDF Document
Sub Export_PDF()
'Select sheets to export
ThisWorkbook.Sheets("Sheet1").Select
'Create the filename to use
‘Change the text “C:\temp\Saved” to the new location you wish to save the spreadsheet
‘Note that “Saved” is the name of the PDF
filename = " C:\temp\Saved”
'Save the selected sheets as a PDF using the above filename
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
filename, Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
End Sub
Comments
Post a Comment