This article will give you the basics of how to print to a network
printer from Word.
by Gary Chalupa
gchalupa@inetnebr.com
This is the Word version of the Excel
printing article. Same concept, almost the same code. Microsoft
Word must be installed on the server for any of this to work. Feel
free to contact me with questions, comments or just to
chat.
If you need to print on a regular basis this method is
inefficient. There is a better way documented here.
The
code is heavily commented so it should be easy to follow. Once you
understand the flow, it is easy to adapt this to other applications
as well. There are some preliminary steps you need to take before it
will work. I detail these steps below with the code following
them.
1. Using Print Manager on the server create a new local
port with the name “C:PCL.out”
Step-by-step:
2. Install a printer with a driver that
will support ALL of the printers you would like to print to.
I recommend the HP Laserjet III. Install this printer as a local
printer on the newly created port, and set it to be the default
printer.
3. Follow method 2 from Q184291.
This will set our printer as the default printer for the system
account. A summary of this process is listed
here.
Step-by-step:
WARNING: Using Registry Editor
incorrectly can cause, system-wide problems that may require you to
install Windows to correct them. Neither I, nor Microsoft, guarantee
that any problems resulting from the use of Registry Editor can be
solved. Use this tool at your own risk.
I used ideas from a
couple of different places to put this together and I need to
mention them.
Word and
ASP
by: Armand Datema
Using
ASP and WSH to Print on Your Intranet
by: Jeff
Sandquist
Formatted Output
using ASP
by: David R. Cline
Q184291
– PRB: COM Objects Fail to Print When Called From
ASP
Microsoft Corporation
Download the code here: Wordprint.zip
Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.