Changing Printing Functionality with Printer Heuristics

ID: Q79930

The information in this article applies to:

SUMMARY

In Word 2.x for Windows, you can use a method called "Setting Printer Heuristics" to adjust the way Word for Windows interacts with the printer driver. This can be useful when the printer is set for an emulation (and printer driver) that has different envelope feeding characteristics than the printer's normal mode.

In Word 6.0 for Windows, you set printer heuristics by choosing Envelopes And Labels from the Tools menu, selecting the Envelope tab, choosing the Options button, and setting the correct envelope Feed Option.

MORE INFORMATION

If an envelope or custom size document is printing incorrectly in Word 2.x, you can use one of the following methods to set a printer heuristic to correct this problem:

Method 1: Setting a Printer Heuristic Using SetPrinterHeuristics Macro

1. From the File menu, choose Open.

2. In the Directories box, select the Word for Windows directory.

3. From the File Name list, select NEWMACRO.DOC.

4. Choose OK.

5. From the Macro Name list, select SetPrinterHeuristic, and choose the

   Demo button.

6. Choose the desired envelope feed options and choose OK.

Word for Windows writes the proper settings to the Microsoft Word 2.0 section of your WIN.INI file for the printer that is selected in the File Print Setup dialog box. The values listed in parentheses correspond to the specific driver heuristic values outlined below.

Note: To close the dialog box without making changes, choose the Cancel button rather than the OK button. Choosing the OK button will set the heuristic to 0 unless you make a change in the feed options.

Method 2: Setting a Printer Heuristic by Editing the WIN.INI File

Rather then using the SetPrinterHeuristics macro to modify the WIN.INI file, you may open the WIN.INI file in an editor such as Word or NotePad, add or modify the Microsoft Word 2.0 section, save, and close the file.

The next section discusses the various printer heuristic options and the associated WIN.INI settings. If you are unsure of the printer driver file name or what setting to use, we recommend that you use the SetPrinterHeuristic macro instead.

To make a modification, add a line to the [Microsoft Word 2.0] section of the WIN.INI file that indicates your printer name and the number corresponding to the following list of functions:

Function             Number    Description
---------            ------    -----------

fPortraitEnvelope:       +1    To print an envelope in portrait
                               orientation.
fPaperTrayLeft:          +2    To print on the left side.
fPaperTrayRight:         +4    To print on the right side.
fPaperTrayBottom:        +8    To print on the bottom half of the page.
fHalfPatternRes:        +16    Windows 3.0 pattern resolution workaround.
fReverseLandscape:      +32    Printer rotates landscape opposite from
                               LaserJet
fEnvManual:             +64    The envelope feeder is really just the
                               manual feeder.
fEnvFeederBuggy:       +128    Avoid asking for the envelope feeder.
fBuggyDevCap:           256    Don't call DeviceCapabilities--buggy driver.
fLandscapeEnvelope      512    To print an envelope in landscape
                               orientation.

For example, if envelopes feed from your PostScript driver from the left side, and Word for Windows assumes that they feed from the right, you can add the line

   PSCRIPT=+2

to the [Microsoft Word 2.0] section in the WIN.INI file to feed envelopes from the left.

If your Lasermaster LJMAX.DRV driver needs a left feed for envelopes, and PostScript images are too coarse, you can add the line

   LJMAX=+18

to the [Microsoft Word 2.0] section in the WIN.INI file to feed envelopes from the left and print images at a higher resolution.

Note: 18 is the sum of options 2 and 16: 2 for left, and 16 for do NOT halve printer resolution.

If a homebuilt driver ABCDEF.DRV feeds from the left, does not require halved picture resolution, and is a Windows 3.0 buggy version that fills up the memory buffer when you choose Page Setup, you can add the line

   ABCDEF=274

to the [Microsoft Word 2.0] section in the WIN.INI file to feed envelopes from the left, print images at a higher resolution, and account for a buggy version of the driver.

Note: 274 is the sum of options 2 for left, 16 for do NOT halve printer resolution, and 256 for the buggy 3.0 driver fix.

The plus sign (+) is never required, but it is a good idea to include it to avoid losing unrelated information. The purpose of the plus sign is to set only one flag while allowing Word for Windows to decide whether the rest of the flags are set. The only number that you should not use with the plus sign is 256.

The plus sign does NOT work with option 256. You should omit the plus sign and set "driver=288" to set both 256 and 32 bits.

Note: Only use the 256 heuristic with printers that would otherwise crash or get unacceptable results when accessing the Page Setup dialog box or printing.

Word for Windows internally sets the 256 heuristic for the following Windows version 3.0 drivers:

   IBMGRX
   TOSHIBA
   TI850
   CITOH
   THINKJET
   IBMCOLOR
   STARM9
   STARM24
   CANON10E
   CANON130
   BROTH9
   BROTH24

KBCategory: kbprint KBSubcategory: kbenvelope Additional query words: shipped 2.0 2.0a winword2 winword 2.0a-CD 2.0b 2.0c

Last Reviewed: July 30, 1997