PDA

View Full Version : Controlling Internet Explorer's "Print pop-up"



sebas1102
06-18-2008, 09:31 PM
Hi all,

I'm trying to control Internet explorer to input, search and print documents.

But everytime I click the submit button, the website will prompt IE to print the document, and the "print popup" will come about.

I tried to use sendkeys("Enter") but it doesn't seem to send the "enter" command to the popup.

I also tried using IE.ExecWB 6, 2, but it only commands IE to print another copy, and it did not supress the "print pop-up". :banghead:

What's the code for clicking "print" button? thanks!

IE.Document.forms(0).Item(17).Click
While IE.Busy = True
Wend
IE.ExecWB 6, 2

sebas1102
06-19-2008, 07:04 PM
Help help anyone?

GreenTree
06-19-2008, 07:22 PM
May not be what you want to get into, but I'd check out AutoHotKey. The script to do what you want to do should be reasonably simple, and it's not too hard to launch an AHK script from VBA.

Not elegant, but it should do the job for you.

GT

sebas1102
06-23-2008, 10:00 PM
May not be what you want to get into, but I'd check out AutoHotKey. The script to do what you want to do should be reasonably simple, and it's not too hard to launch an AHK script from VBA.

Not elegant, but it should do the job for you.

GT


hmm thanks! Is there no other way out?

sebas1102
06-24-2008, 08:13 PM
Hi all,

Ive tried autohotkeys but it seems to only perform the task only when Autohotkey is installed.I need a coding that is portable enough so that other user could use, without installing any additional stuff.... is that possible?