Since I have WordPad(Write.exe) installed on my machine by default, I have been trying
to find a way to print 'RTF files' from the command-line using RunProgram()
Doing some reading, I've read that...
#1 - To print any supported 'Text' File to the Default Printer
#2 - To print a compatible .doc, .rtf, .txt, .wri or other document right to
your default printer, simply open up a DOS window (Or click "Start > Run")
and type the command "write.exe /p filename".
This command line utility will automatically send the document you choose to your Default printer.
#3 - Sometimes, you may want to print a Wordpad-compatible document to another printer in
your home or office network. To specify a printer other than your default printer click on:
"Start," choose "Run" and type "write.exe /pt TextFileName PrinterName [ DriverName [ PortName ] ]".
Alternatively, you can open up a DOS window and type the same command.
; So my Choices:
; #1 - "write.exe filename" from the command line.
; #2 - Print to the Default Printer - "write.exe /p filename"
; #3 - Print to another Printer - "write.exe /pt TextFileName PrinterName [ DriverName [ PortName ] ]"
This is what I have, so far:
Code: Select all
FileName.s = GetCurrentDirectory() + "Xtras.rtf"
Debug FileName
Result = RunProgram("write.exe", "/p", FileName, #PB_Program_Wait|#PB_Program_Hide)
Maybe there's a completely different solution to print RTF files?