F
Frustrated
Hi,
I'm trying to write a macro that will print a number of worksheets to
different PDF files. I've used the macro recorder to generate sample code,
and it uses ExecuteExcel4Macro to execute the print function.
My problem is that when the code runs, the print dialog box waits for me to
give it a file name (I don't want the default) and to click 'Save'. This is
what I want to automate so that there is no user interaction. This is the
code that the macro recorder made for me:
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,""Adobe PDF on Ne01:"",,TRUE,,FALSE)"
I'm assuming that one or more of the missing parameters from the Print call
are what I need to set, but I have no idea what the missing parameters do.
In the past, I've used SendKeys to interact with dialog boxes, but that isn't
working either. I'm running Office 2007, if that makes a difference.
Can anyone help with this? Thanks!
I'm trying to write a macro that will print a number of worksheets to
different PDF files. I've used the macro recorder to generate sample code,
and it uses ExecuteExcel4Macro to execute the print function.
My problem is that when the code runs, the print dialog box waits for me to
give it a file name (I don't want the default) and to click 'Save'. This is
what I want to automate so that there is no user interaction. This is the
code that the macro recorder made for me:
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,""Adobe PDF on Ne01:"",,TRUE,,FALSE)"
I'm assuming that one or more of the missing parameters from the Print call
are what I need to set, but I have no idea what the missing parameters do.
In the past, I've used SendKeys to interact with dialog boxes, but that isn't
working either. I'm running Office 2007, if that makes a difference.
Can anyone help with this? Thanks!