Hi - Thanks to the kind folks here I have figured out a way to print my excel worksheets to PDF. Now I just need to be able to automatically save under a filename. I would go with a sheet and cell reference, but that would force me to ungroup the sheets I need to print to PDF.
Any suggestions?
Here is the code I am using:
Sub PDF()
Dim PDFFileName As String
Sheets(Array("Market Strategy", "Clinical Strategy", "Operational Strategy", _
"Financial Strategy", "Definitions")).Select
Sheets("Market Strategy").Activate
ActiveWindow.Zoom = 100
Application.ActivePrinter = "Adobe PDF on Ne01:"
Let PDFFileName = "U:\PDF\" '& Sheet("Market Strategy").Cell(2, 2)
SendKeys PDFFileName & "{ENTER}", False
ActiveWindow.SelectedSheets.PrintOut copies:=1, Collate:=True
PSFileName = Chr(34) & PDFFileName & Chr(34)
End Sub
Any suggestions?
Here is the code I am using:
Sub PDF()
Dim PDFFileName As String
Sheets(Array("Market Strategy", "Clinical Strategy", "Operational Strategy", _
"Financial Strategy", "Definitions")).Select
Sheets("Market Strategy").Activate
ActiveWindow.Zoom = 100
Application.ActivePrinter = "Adobe PDF on Ne01:"
Let PDFFileName = "U:\PDF\" '& Sheet("Market Strategy").Cell(2, 2)
SendKeys PDFFileName & "{ENTER}", False
ActiveWindow.SelectedSheets.PrintOut copies:=1, Collate:=True
PSFileName = Chr(34) & PDFFileName & Chr(34)
End Sub