Microsoft KB Archive/93759

{|
 * width="100%"|

How to Use WordBasic Print Command to Send Output to Printer

 * }

Q93759

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

-

SUMMARY
Although the WordBasic Print command is usually used to write output to the status bar, you can also use this command to write output to the printer.

MORE INFORMATION
The sample macro below sends the text string &quot;This is a test&quot; to the printer on LPT1.

Note: In this macro, no form feed follows the text sent to the printer. To actually print the text, you must also send a line feed. This happens automatically if you send another print job to the printer.

Sub MAIN Open &quot;lpt1.dos&quot; For Output As #1 Print #1, &quot;This is a test&quot; End Sub WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code &quot;as is&quot; without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.