Hi Peter,
Hope this helps. It took me quite a time to get the answer initially, and
then my code stopped working after 5.5 of Internet Explorer, but thankfully
due to some kind soul who e-mailed me a couple of months after I put out a
query, the problem was resolved - by sending 0s in the parmaters rather than
null strings as initially recommended by the Microsoft dcoumentation.
I have quickly tried the coe in VB.Net and it seems to work for me.
Best wishes
Paul Bromley
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Dim sPrintEm As Integer = 1
Dim eQuery As SHDocVw.OLECMDF
eQuery = AxWebBrowser1.QueryStatusWB(SHDocVw.OLECMDID.OLECM DID_PRINT)
If Err.Number = 0 Then
If eQuery And SHDocVw.OLECMDF.OLECMDF_ENABLED Then
Select Case sPrintEm
Case "1"
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRI NT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, 0, 0)
Case "2"
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRI NT,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER , 0, 0)
End Select
Else
MsgBox("The Print command is currently disabled.")
End If
End If
End Sub
"Peter" <pe***@mclinn.com> wrote in message
news:dc*************************@posting.google.co m...
I have a couple pages on our intranet that I want to print on a
regular basis. The conent is dynamic, and so I want to take
snapshots, and send these jobs directly to a printer on the network.
Has anyone done this before? I'm looking for some sample code.
Thanks,
Peter