Microsoft KB Archive/39576

= Use &quot;LPT1: PROMPT&quot; for Mailing Labels/Other Printer Paper Sizes =

Article ID: 39576

Article Last Modified on 11/21/2006



This article was previously published under Q39576



SUMMARY
OPENing the &quot;LPT1:PROMPT&quot; device name in a QuickBASIC program prompts you for various print options and Apple ImageWriter printer paper sizes, including the following:

US Letter (8.5 inches by 11 inches)

Mailing Label (1-inch form size)

R4 Letter

US Legal (8.5 inches by 14 inches)

Rolodex Card (3-inch form size)

Computer Paper (11-inch form length)

Changing the ImageWriter page size to 1-inch mailing labels or 3-inch Rolodex cards allows printing where a formfeed aligns to the next label or card in a spool. The Mailing Label and Rolodex options are not available to the Apple LaserWriter printer (or versions of Macintosh BASIC prior to QuickBASIC).



MORE INFORMATION
You can select your desired printer driver in the Chooser in the Apple menu. The appropriate ImageWriter or LaserWriter driver file must exist in the System Folder.

ResEdit can be used to change the ImageWriter page length. This is explained in &quot;Changing the Print Page Size with PREC&quot; on Pages 156-157 of the &quot;Microsoft QuickBASIC for Apple Macintosh: User's Guide.&quot;

To read the &quot;LPT1:PROMPT&quot; settings that are clicked at run time, search for a separate article by querying on the following word:

GetPrintRecord

Note that you cannot suppress the automatic formfeed when the &quot;LPT1:&quot; or &quot;LPT1:PROMPT&quot; device is CLOSEd.

The following is a code example: ON ERROR GOTO ERHANDLE OPEN &quot;LPT1:PROMPT&quot; FOR OUTPUT AS #1 ' An error occurs on the following statement if you clicked CANCEL ' in the &quot;LPT1:PROMPT&quot; dialog box: PRINT #1,&quot;THIS IS MEANT TO GO TO PRINTER&quot; CLOSE label1:

PRINT &quot;This is the end.&quot;

END ERHANDLE:

E = ERR ' assign error number to variable E   PRINT &quot;ERROR NUMBER = &quot;; E   IF E = 52 THEN

PRINT &quot;YOU CLICKED THE CANCEL BUTTON. PRINTING IS CANCELED.&quot;

END IF  RESUME label1     ' Resumes execution at label1. File not opened.

Additional query words: MQuickB

Keywords: KB39576

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.