Make your own free website on
Print File


Add 1 Text Box to your form.
Set the Text Box's MultiLine property to True, and the
Text Box's Visible property to False.

Form Code

Private Sub Form_Load()
    Dim file As String

'Replace 'c:\autoexec.bat' with the file you want to print
    file = "c:\autoexec.bat"
    Open file For Input As #1
    Text1.Text = Input(LOF(1), #1)
    Printer.Print Text1.Text

End Sub

Go Back