Results 1 to 3 of 3

Thread: WebBrowser control

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    Is there an easy way to print from a WebBrowser control?


  2. #2
    Addicted Member
    Join Date
    Jul 1999
    Location
    Portland, OR.
    Posts
    226
    Make a command button and call it BtnPrint and paste the following code:

    Code:
    Private Sub BtnPrint_Click()
      Dim eQuery As OLECMDF   
      On Error Resume Next
      
      eQuery = WebBrowser1.QueryStatusWB(OLECMDID_PRINT)  
        If Err.Number = 0 Then
    If eQuery And OLECMDF_ENABLED Then 
       WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, "", ""     
             Else
                  MsgBox "The Print command is currently disabled."
            End If
        End If
     If Err.Number <> 0 Then MsgBox "Print command Error: " & Err.Description
    End Sub

    Good Luck.


    [Edited by Lyla on 08-03-2000 at 11:28 AM]

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    Thnks very much

    got me out of a major hole, there!

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