francozola25
08-27-2008, 12:39 AM
Hi i was wondering could someone help with the following.
My VBA application stops half way through because of an Adobe Dialog Message. I am trying to print off pdfs from a combo box on a VBA drop down userform. It does print off but the macro stop midway.
Is there a way i can use a SendKeys or anything to get around this. I have very little experience of SendKeys but have heard a lot of people do not like using them. I have tried everything else and my application is hanging in the balance because of this.
Please see code:
Call ShellExecute(0, vbNullString, strURL, vbNullString, vbNullString, 0) ' Change 0 to vbNormalFocus to view.
SendKeys "{ENTER}"
PrintURL = ShellExecute(0, "print", strURL, vbNullString, vbNullString, vbHide) ' Change 0 to vbNormalFocus to view.
What it is doing is opening the strURL and printing it off without displaying to the user. It stops half way through that is why i have placed the SendKey here but it still doesn't work. I have also tried a wait command.
My VBA application stops half way through because of an Adobe Dialog Message. I am trying to print off pdfs from a combo box on a VBA drop down userform. It does print off but the macro stop midway.
Is there a way i can use a SendKeys or anything to get around this. I have very little experience of SendKeys but have heard a lot of people do not like using them. I have tried everything else and my application is hanging in the balance because of this.
Please see code:
Call ShellExecute(0, vbNullString, strURL, vbNullString, vbNullString, 0) ' Change 0 to vbNormalFocus to view.
SendKeys "{ENTER}"
PrintURL = ShellExecute(0, "print", strURL, vbNullString, vbNullString, vbHide) ' Change 0 to vbNormalFocus to view.
What it is doing is opening the strURL and printing it off without displaying to the user. It stops half way through that is why i have placed the SendKey here but it still doesn't work. I have also tried a wait command.