Results 1 to 3 of 3

Thread: WebBrowser: Preventing Display of Print Dialog

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    35
    Running IE 5.0 and VB 6.0 SP4 on Windows 95, the following command does what it is supposed to: print the WebBrowser document without displaying the Print Dialog.

    brwWebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, "", ""

    However, the document that appears to be Microsoft’s definitive statement on printing from the WebBrowser control, “Printing with the Internet Explorer WebBrowser Control” at http://msdn.microsoft.com/workshop/browser/wb_print.asp, states that the OLECMDEXECOPT_DONTPROMPTUSER parameter is ignored by IE 5.0. That obviously is not my experience.

    Have any of you seen an environment in which OLECMDEXECOPT_DONTPROMPTUSER is ignored, i.e., the Print Dialog is displayed despite specification of this option?

    John Fritch


  2. #2
    Guest
    Did you try this?

    Code:
    brwWebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
    Rather than what you had:

    Code:
    brwWebBrowser.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, "", ""

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    35
    The code I cited, including the two terminal "" values, was copied from Microsoft documentation at http://msdn.microsoft.com/workshop/c.../wb_print.asp. It works as it is supposed to on my machine.

    My concern is that Microsoft documentation at http://msdn.microsoft.com/workshop/browser/wb_print.asp suggests that there are environments in which this code will not work (i.e., will display the Print Dialog before printing). Is that really true?

    John Fritch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width