Click to See Complete Forum and Search --> : Printing HTML File from VB program
gknierim
March 22nd, 2001, 04:32 PM
Ok, I have generated an HTML file. Now, I need to print the file (not the contents, but the actual HTML file as it appears in the browser, but I do not want to open the browser). Does anyone know how to do this?
I want the file to automatically print with no user intervention.
I do not want the HTML file (browser) to open either.
Thanks for any suggestions,
Greg
wbeetge
March 23rd, 2001, 03:27 AM
I would use Internet control and just not display it.
Set the URL and let it load the page. The internet control has a print method built into it.
Iouri
March 23rd, 2001, 07:05 AM
Try to download HTML to the file
Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" (ByVal pCaller As Long, _
ByVal szURL As String, ByVal szFileName As String, _
ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Sub Command1_Click()
Dim lRet As Long
lRet = URLDownloadToFile(0, "http://www.experts-exchange.com", "c:\windows\desktop\test.htm", 0, 0)
If lngRetVal = 0' Then DownloadFile = True
MsgBox "Done downloading"
else
MsgBox "Error"
End if
End Sub
and then print this file
Iouri Boutchkine
iouri@hotsheet.com
gknierim
March 26th, 2001, 10:36 AM
Where would I find this control? What reference? I loaded selected the Microsoft Internet Controls reference but i could not find any help on it. Is this the right one?
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.