I want to be able to print an Excel sheet to a PDF file and save it. A present I can record a macro that prints the file to a PDF via CutePDF. But in this process it asks for a path to save the file. I would like to be able specify the path and file name in the code so that user doesn't need to. Can some one tell be how to do that.
The recorded macro code is
Application.ActivePrinter = "CutePDF Writer on CPW2:"
ExecuteExcel4Macro _
"PRINT(1,,,1,,,,,,,,2,""CutePDF Writer on CPW2:"",,TRUE,,FALSE)"
The recorded macro code is
Application.ActivePrinter = "CutePDF Writer on CPW2:"
ExecuteExcel4Macro _
"PRINT(1,,,1,,,,,,,,2,""CutePDF Writer on CPW2:"",,TRUE,,FALSE)"