How to print from a WebBrowser control 
Author Message
 How to print from a WebBrowser control

Use this code (only for IE 4.0)

Public Sub BtnPrint_Click (ByVal Wb As WebBrowser)
    Dim eQuery As OLECMDF       'return value type for QueryStatusWB
    On Error Resume Next
    eQuery = Wb.QueryStatusWB(OLECMDID_PRINT)  'get print command status
     If Err.Number = 0 Then
            If eQuery And OLECMDF_ENABLED Then
                Wb.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, "", ""
'Ok to Print?
          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

Bye.

Peter Gentini

Henrik Storgaard ha scritto nel messaggio

Quote:
>Hi There
>Does anyone know how to print the contents of a WebBroser control ?

>TIA
>Henrik Storgaard



Tue, 09 May 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. How Can I Print The Document WebBrowser Control

2. problem printing from the WebBrowser control

3. Programmatically Print Contents of WebBrowser Control

4. problem printing from the WebBrowser control

5. problem printing from the WebBrowser control

6. How to print with MS Webbrowser control

7. how to print from a WebBrowser-Control ?

8. problem printing from the WebBrowser control

9. problem printing from the WebBrowser control

10. programmatically controlling header/footer on doc printed from WebBrowser control

11. Printing w/ the WebBrowser control

12. WebBrowser Control, printing....

 

 
Powered by phpBB® Forum Software