
Originally Posted by
bchandz
I am printing a .pdf of a spreadsheet with a macro, using Bullzip PDF Printer. Here's the code (in Excel 2003 VBA) that I'm using:
Application.ActivePrinter = "Bullzip PDF Printer on Ne05:" 'Chooses BullZip PDF printer for printing
Selection.PrintOut Copies:=1, ActivePrinter:="Bullzip PDF Printer on Ne05:" 'Prints .pdf
My problem is that I need commands to a) Save the .pdf when that dialog appears (just an Enter key on keyboard does it); b) Overwrite the existing .pdf when that dialog appears (Enter key again); c) Close the .pdf file once it's displayed (File - Exit?). I've tried using
"Application.SendKeys ("[ENTER}") and that does not work. Nothing happens when the macro reaches that command.
Thanks for any help available,
Bill Chandler
If you want to persist with using SendKeys rather than the batch file method mentioned above by patsauve, the relevant commands are:
These work for me albeit using a diferent PDF writer to your one.
By the way "Filename" on the second line is a string variable from earlier in my code and is what I want to call the newly created PDF file.
The wait command required may vary from system to system but seemed to be what my one needed so it didn't miss a command.
Hope this helps.
Bookmarks