Private Sub PrintPage()
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