Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print an html file 2

Status
Not open for further replies.

DTRNTR

MIS
Jun 27, 2000
34
US
Can anyone suggest some 'magic' to allow me to send a formatted html file(just tags and tables, no gifs or jpgs) to a printer from within a VB app?

Any 3rd party tools that could handle this?

Thanks in advance for any assistance you can provide!
 
You don't need a third party tool. Just add the DHTML Edit Control component to your project. Drop a DHTMLEdit control onto a form, and two coammand buttons. The try this code:
[tt]
Option Explicit
Private LoadInProgress As Boolean

Private Sub Command1_Click()
LoadInProgress = True
DHTMLEdit1.LoadURL "http:\\End Sub

Private Sub PrintHTML()
If Not LoadInProgress Then DHTMLEdit1.PrintDocument True
End Sub

Private Sub Command2_Click()
PrintHTML
End Sub

Private Sub DHTMLEdit1_DocumentComplete()
LoadInProgress = False
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top