InternetExplorer Automation -Printing html and Pdf silently

M

Mohan

Hello Experts,

Would like to use IE application object to print html and pdf silently. When
a html file is printed, it is printed silently without any print dialogs.
When a pdf file is printed, a print dialog is shown. Is there any way to
avoid this.

Any help would be appreciated.

Set ie = CreateObject("internetexplorer.application")
'ie.navigate "C:\Test.pdf"

OLECMDID_PRINT = 6
OLECMDEXECOPT_DONTPROMPTUSER = 2
ie.execWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER

ie.Quit

Thanks,
Mohan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top