Macro Question (Print to PDF w/ custom file naming)

Copper Contributor

All -

 

I am attempting to create a macro that saves each sheet in the workbook as its own PDF which is stored in a specific folder. I would like to be able to reference a cell in the workbook (e.g. A1=06 - ) and have all PDF files be saved as  "06 - Sheet Name". Below is the Macro that I created.

 

Sub Print_To_PDF()
'
' Print_To_PDF Macro
'

'
    Sheets("SQL - Forecast v Plan").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
End Sub

 

I have struggled tremendously in attempting to get this macro established. The existing Macro allows me to get to a save as window but requires me to name the file, which is a step I would like to automate. As noted by my username I am new to excel so any help would be greatly appreciated.

0 Replies