VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Print the contents of a web browser control from a VB application.

by Patrick Moore (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 12th May 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Print the contents of a web browser control from a VB application.

Rate Print the contents of a web browser control from a VB application.



    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
    
End Sub

Download this snippet    Add to My Saved Code

Print the contents of a web browser control from a VB application. Comments

No comments have been posted about Print the contents of a web browser control from a VB application.. Why not be the first to post a comment about Print the contents of a web browser control from a VB application..

Post your comment

Subject:
Message:
0/1000 characters