Hi,
I wonder if someone can help me. I am trying to print a Excel document
to Acrobat using the Adobe PDF printer driver. I can get the initial
print dialog box up fine (where you can select the driver, etc.), and
can send an "{ENTER}" to progress to the next dialog where you must
input the required pdf filename. This is where the problem is - I
cannot get this dialog to accept any sendkeys so nothing happens. As
soon as I click cancel/save on this box, the keys are then sent to
Excel.
My code is as follows:
SendKeys "^p~", True 'bring up the initial printer dialog box.
Application.Wait Now + TimeSerial(0, 0, 1)
SendKeys "{TAB}", True
Application.Wait Now + TimeSerial(0, 0, 1)
SendKeys "{TAB}", True 'tab down to the OK button
Application.Wait Now + TimeSerial(0, 0, 1)
SendKeys "~", True 'press enter to progress to the next box
SendKeys "C:\PDFFILE.PDF", True 'enter the filename
Application.Wait Now + TimeSerial(0, 0, 1)
SendKeys "%s", True ' alt s to save the file
Any suggestions at all, in particular about how I might manage to give
focus to the second "save file" dialog would be much appreciated.
Thank you
--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
To post to this group, send email to [email protected]
If you find any spam message in the group, please send an email to:
Ayush Jain @ [email protected] or
Ashish Jain @ [email protected]
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---