Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a web browser 1

Status
Not open for further replies.

JonathonC

Technical User
Aug 18, 2001
43
GB
How can I allow the user to print the HTML page displayed in a web Browser when they click on on a Toolbar button.

Thanks in advance,
Jonathon.
 
Code:
Dim eQuery As OLECMDF       'return value type for QueryStatusWB
        On Error Resume Next
            eQuery = wbIntranet.QueryStatusWB(OLECMDID_PRINT)  'get print command status
            If Err.Number = 0 Then
                    If eQuery And OLECMDF_ENABLED Then
                        wbIntranet.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 &quot;Print command Error: &quot; & Err.Description
        On Error GoTo 0
 
Thanks John, thats great, i've looked everywhere for a piece of code like that and now i've found it.

Thanks again

Jonathon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top