Hi,
I have a macro that saves an excel sheet as a pdf and names the pdf based on cell contents as below.
Sub SPO()
'
' SPO Macro
'
Dim OrdName As String
Dim OrdNumb As Integer
OrdName = Sheets("PO FORM").Range("B8").Text
OrdNumb = Sheets("PO FORM").Range("H2").Text
SaveFileAs.Filename = "H:\Production\ORDERS\" & OrdName & "G0" & OrdNumb & ".pdf"
SendKeys Filename & "{ENTER}", False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True
End Sub
I would like then to save active worksheet as the original excel sheet in the original folder. I have been unsuccessful as I can only get it to save in original folder as pdf not excel.
Any ideas would be greatly appreciated
Regards
Chris
I have a macro that saves an excel sheet as a pdf and names the pdf based on cell contents as below.
Sub SPO()
'
' SPO Macro
'
Dim OrdName As String
Dim OrdNumb As Integer
OrdName = Sheets("PO FORM").Range("B8").Text
OrdNumb = Sheets("PO FORM").Range("H2").Text
SaveFileAs.Filename = "H:\Production\ORDERS\" & OrdName & "G0" & OrdNumb & ".pdf"
SendKeys Filename & "{ENTER}", False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True
End Sub
I would like then to save active worksheet as the original excel sheet in the original folder. I have been unsuccessful as I can only get it to save in original folder as pdf not excel.
Any ideas would be greatly appreciated
Regards
Chris