Hi, I am trying to automate my PDF print outs by using the record macro function.
However, the recording function is not able to capture my file name and path where I need to save the new PDFs.
The current codes are as per below, can anyone help to advise how I can automate the whole process?
Sub Macro1()
Selection.AutoFilter Field:=2, Criteria1:="=China", Operator:=xlOr, _
Criteria2:="=Hong Kong"
Application.ActivePrinter = "CutePDF Writer on CPW2:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True
End Sub
However, the recording function is not able to capture my file name and path where I need to save the new PDFs.
The current codes are as per below, can anyone help to advise how I can automate the whole process?
Sub Macro1()
Selection.AutoFilter Field:=2, Criteria1:="=China", Operator:=xlOr, _
Criteria2:="=Hong Kong"
Application.ActivePrinter = "CutePDF Writer on CPW2:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True
End Sub