Just shell to a command prompt and use the Print command.
Shell ("cmd /c print c:\fred.txt")
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
You may also use ShellExecute function to print a variety of documents including text files.
___
[tt]
Private Declare Function ShellExecute Lib "shell32" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub PrintDocument(Document As String)
ShellExecute hwnd, "print", Document, "", "", 0
End Sub
Private Sub Form_Load()
PrintDocument "C:\fred.txt"
End Sub[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.