Both of these solutions worked great. For us less technical gurus, I
had to 1. Add Reference - Microsoft.mshtml
2. Open a form and add in a com object named: Microsoft Web Browser
The rest of the code worked sweet! Thanks!
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
AxWebBrowser1.Navigate("
http://www.google.com")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim sPrintEm As Integer = 1
Dim eQuery As SHDocVw.OLECMDF
eQuery = AxWebBrowser1.QueryStatusWB(SHDocVw.OLECMDID.OLECMDID_PRINT)
If Err.Number = 0 Then
If eQuery And SHDocVw.OLECMDF.OLECMDF_ENABLED Then
Select Case sPrintEm
Case "1"
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, 0, 0)
Case "2"
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
End Select
Else
MsgBox("The Print command is currently disabled.")
End If
End If
End Sub
The other code printed anything locally without issue! You guys rock!
Thanks!