Depends I guess on what you want to print and to where.
I wrote a script that prints mailing labels by writing to a local LPT port using the FileSystemObject. Relative excerpts follow:
Set FSO = CreateObject("Scripting.FileSystemObject"
Set objPrinter = FSO.CreateTextFile("LPT1:", True)
...
objPrinter.WriteBlankLines 1
objPrinter.WriteLine(MAILCODE)
objPrinter.WriteLine(ADDRESSEE)
objPrinter.WriteLine(ADDRESS_LINE1)
objPrinter.WriteLine(CITYSTZIP)
objPrinter.WriteBlankLines 4
objPrinter.Close
Note that this prints UNFORMATTED text to the printer. It's like doing a copy of a text file to the printer. I.E.: "copy mytextfile.txt LPT1"
Other methods I've seen use HTML and COM objects to control IE to print, but I do not have any practical experience doing it.
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.