Microsoft KB Archive/29815

Multiplan: Entering Printer Control Codes PSS ID Number: Q29815 Article last modified on 06-04-1990 PSS database name: D_MPlan

1.x 2.x 3.00 3.01 3.02 3.04

MS-DOS

Summary:

Multiplan versions 1.x, 2.x, and 3.x can send control codes to a printer through the “setup:” field of the Print Options command. In Multiplan versions 4.00 and 4.01, control codes are sent by the printer driver.

Printer manuals most often present control codes as decimal representations (for example, 027 or 015) and occasionally in hexadecimal or ASCII format.

Multiplan expects the ASCII control character represented by the code specified in the printer manual. If the printer manual provides a code with a decimal value of less than 32, you must add 64 to that number to determine the ASCII equivalent.

More Information:

If you have an Epson printer, the code for compressed print is specified in the Epson printer manual as decimal 015. Since this number is less than 32, you must add 64 to determine what character to use to represent it in the Print Options “setup:” field of Multiplan.

Thus, by adding 64 to 15, you get 79, which corresponds to the ASCII letter “O” (uppercase “o”, not a zero). This procedure tells you that Multiplan will expect the letter “O” preceded by “^” to specify that it is really a character less than 32 (a “control” character). Typing “^O” in Print Options “setup:” sends the decimal value 015 to your printer at the beginning of each print job.

Some codes are referred to as escape sequences because they begin with decimal 027, which is the character commonly referred to as “escape.” Because “escape” is a control character, by virtue of being a value less than decimal 32, you must add 64 to determine what character to use to represent it. Since 27 plus 64 is 91, and the ASCII character represented by decimal 91 is “[” (the left square bracket), the escape code is entered in Print Options “setup:” as “^[”.

Suppose you want emphasized print with an Epson printer. The Epson code for this is ESC E, also represented as CHR$(027)“E”. This is entered into Print Options “setup:” as “^[E”.

Some of these characters may be unavailable on your keyboard. If you have an Apple II or II+, you can get a caret by typing SHIFT+N, and a left square bracket by typing CTRL+K.

Copyright Microsoft Corporation 1990.