This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C2187E.8E561FB0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hello, all.
I'm having problems printing (sometimes) from a WebBrowser object.
The scenario is this:
Create an HTML page as a disk file and Navigate to it.
The problem occurs when I try to print the HTML page.
When I click on a command button, the following code executes:
Dim eQuery As OLECMDF 'return value type for QueryStatusWB
On Error Resume Next
eQuery = wbResult.QueryStatusWB(OLECMDID_PRINT) 'get print command
status
If Err.Number = 0 Then
If eQuery And OLECMDF_ENABLED Then
wbResult.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, "",
"" 'Ok to Print?
Else
MsgBox "The Print command is currently disabled."
End If
End If
'i think Err.Number -2147221248 is for user hitting cancel
If Err.Number <> 0 And Err.Number <> -2147221248 Then
MsgBox "Print command Error: " & Err.Description
End If
Most of the time, the HTML page prints correctly; sometimes it doesn't
Whenever it fails to print, I can right-click on the HTML page, select
Print from the context menu and it prints correctly.
Is there some way to make the printing more consistent?
Tom Drinkard
EDIT, Inc.
tomdrinkard@e...
(xxx) xxx-xxxx (voice)
(xxx) xxx-xxxx (fax)