Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to skip Print Dialog box

5 views
Skip to first unread message

rpotash

unread,
Feb 9, 2004, 12:21:08 PM2/9/04
to
I need to print a number of html using the following command:

ShellExecute hwnd, "print", "file1.htm", vbNullString, vbNullString, SW_SHOW
ShellExecute hwnd, "print", "file2.htm", vbNullString, vbNullString, SW_SHOW
ShellExecute hwnd, "print", "file3.htm", vbNullString, vbNullString, SW_SHOW

The problem is that Windows displays the print dialog box before printing each file. How can I have Windows simply print the files without displaying the dialog box?

Thanks,
Rich...

Larry Serflaten

unread,
Feb 9, 2004, 2:58:28 PM2/9/04
to
http://groups.google.com/advanced_group_search?q=group:microsoft.public.vb.*&hl=en&safe=off&num=50

"rpotash" <anon...@discussions.microsoft.com> wrote

For examples, go here:
http://groups.google.com/advanced_group_search?q=group:microsoft.public.vb.*&hl=en&safe=off&num=50

Type in what you see in caps:
EXECWB PRINT DONTPROMPTUSER

Basically, you can load the files into a WebBrowser control and use its ExecWB
method to print the page. OLECMDEXECOPT_DONTPROMPTUSER is the
cmdexecopt (parameter value) that tells it not to show that dialog box.

LFS


0 new messages