|
-
Nov 2nd, 2001, 07:32 AM
#1
Thread Starter
Member
printing by using webbrowser control...
hai,
i am using web browser control in my application. i am dynamically generating html file and i am opening that file by using webbrowser control. Now I want to take print out that file by using web browser control. I done this in Windows Operating System by using API. the following is that API.
Shell "rundll32.exe c:\windows\system\MSHTML.dll,PrintHTML " & _
wb.LocationURL, vbNormalFocus
But it is not working in Windows-NT, even if i changed that directory to
c:\winnt\system32\MSHTML.dll....
can any body help on this...
bye
-
Nov 5th, 2001, 07:08 AM
#2
New Member
Reply For Printing Using the WebBrowser Control
Hi Pavan,
Nice meeting you.
Try the code given below. Just copy as it is.
Beaware you need a command button on the form containing Web Browser Control. Name it as cmdPrint.
Good Luck.
Private Sub cmdPrint_Click()
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
Exit Sub
End If
End If
If Err.Number <> 0 Then Exit Sub
End Sub
Regards
sushil
-
Nov 5th, 2001, 07:23 AM
#3
Thread Starter
Member
Re: Reply For Printing Using the WebBrowser Control
Hai thank u very much.... For that i found an alternative solution.... But any how thank you for that...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|