Basic Printing QUestion

sethindeed
10-03-2001, 09:01 AM
Suppose I have an HTML file and I want to print it throughout VB. (Send a message to the Printer to print this file ). How can I do that ?
Thanx :)

Squirm
10-03-2001, 10:17 AM
To print the text would be easy. To print the HTML as it would be displayed in a browser would be much trickier.

To print a HTML file text, you might try:

<pre>Dim strTemp As String

Open "C:\index.htm" For Input As #1
While Not EOF(1)
Input #1, strTemp
Do Until Len(strTemp) < 79
Printer.Print Left(strTemp, 79)
strTemp = Right(strTemp, Len(strTemp) - 79)
Loop
Printer.Print strTemp
Wend
Close #1

Printer.EndDoc</pre>

Works for me images/icons/wink.gif

<P ID="edit"><FONT class="small"><EM>Edited by Squirm on 10/03/01 11:24 AM.</EM></FONT></P>

sethindeed
10-03-2001, 01:43 PM
Could it be easier to print an Excel sheet ?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum