Hello all,
I am trying to use the macro recorder to help automate the task of saving files to a PDF, but there are limitations with the macro recorder (as you well know!).
What I would like to do alter the macro below to replace my file name with this named range: ExportToPDFName.
In other words, I would like to the "WI - New London School District 2011-16 Enr. Proj." portion of the macro to reference the ExportToPDFName named range. Can someone help me with this?
Thanks,
Pete
Sub ExportToPDF()
'
' ExportToPDF Macro
'
'
Sheets("WriteUp").Select
Range("A1").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\grender\Documents\Pete\Enrollment Projections\Districts\PDFs\WI - New London School District 2011-16 Enr. Proj..pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End Sub
I am trying to use the macro recorder to help automate the task of saving files to a PDF, but there are limitations with the macro recorder (as you well know!).
What I would like to do alter the macro below to replace my file name with this named range: ExportToPDFName.
In other words, I would like to the "WI - New London School District 2011-16 Enr. Proj." portion of the macro to reference the ExportToPDFName named range. Can someone help me with this?
Thanks,
Pete
Sub ExportToPDF()
'
' ExportToPDF Macro
'
'
Sheets("WriteUp").Select
Range("A1").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\grender\Documents\Pete\Enrollment Projections\Districts\PDFs\WI - New London School District 2011-16 Enr. Proj..pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
End Sub