Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am trying to print an rtf document with a dos batch file. From what I can tell, it can be done like this:
print drive/document.rtf /d:printernameHowever, I noticed that it seems to be printing out the actual rtf character/code rather than the formatted document...which in this case has header and footer, logo, tables, and lots of other Word type of formatting. Can this kind of file be printed with a dos batch file?
Any examples would be great. Thanks.

First of all the Print command reported is NOT a DOS command, but a Win 2000 statement not related at all with the real DOS Print command.
The Print command in both operating environments (DOS and Win 2000) prints plain ascii file omly,i.e. text documents without formatting.
To print an rtf file you need to invoke a word processor able to convert it into a printable charachters stream via a device driver.

Okay.
Any idea how to do that? I know Word is installed on the machine where the rtf's are. Can Word be invoked automatically, and print, then close w/out user intervention?
Thanks.

Yes, you can do it in that way,and I can help you, but you need to be patient as now I have to attend an urgent calling. Later I'll be back. meanwhile some other guy may satisfy your need.

pushcode,
"Can Word be invoked automatically, and print, then close w/out user intervention"
So why not try Windows 2000 Forum rather than DOS Forum? Windows 2000 does not include "DOS", and the Windows 2000 program (i.e. Word) won't work in DOS. The "Command Prompt" in Win2000 is just the WinNT/2K/XP+ system console, which is NOT DOS. Below is the *quotation* from the warning messages of this forum:
"DO NOT post questions related to NT Batch scripting on this forum. Use the Programming forum.
Use the Windows NT, 2000 or XP forum for questions regarding the Windows NT, 2000 or XP "DOS" command prompt."
For more information about the "Command Prompt" (Win32 Console) in WinNT/2K/XP+, you may read this page:

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |