XL: "Cannot Print to LPT1" Running Lotus Print MacroLast reviewed: March 27, 1997Article ID: Q138623 |
5.00 5.00c
WINDOWS
kbnetwork kbprint kberrmsg
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, if you run a Lotus 1-2-3 macro that performs a print command across a Novell network, you receive the following error messages
Macro error at cell: <cell address>where <cell address> is the address of the macro's print statement followed by the error:
Error printing to LPT1 CAUSEIn order to print to a Novell Netware print queue, the LPT port must be redirected (captured) to the appropriate server and print queue. Lotus 1-2- 3 requires the printer port be captured. Microsoft Windows, by default, does not capture LPT ports. This capture must be done either at the MS-DOS level or through your Novell login script. For additional information on this error under Microsoft Windows 95, please see the following article in the Microsoft Knowledge Base:
Article-ID: Q152217 TITLE : XL: Error Printing to LPT1 with 1-2-3 Print Macro in Win95 WORKAROUNDTo work around this problem, use either of the following methods. Method 1: Use the Novell Capture command at the MS-DOS prompt before you enter Microsoft Windows to redirect or capture a printer port to a network server. For example, the following capture statement redirects LPT1 to the server named SERVER1 and the printer queue named QUEUE1. It also turns off form-feed, banners, and disables time-outs. capture L=1 s=SERVER1 q=QUEUE1 nff nt nb ti=0 Once you have restarted Windows, go to the Printers dialog box in Control Panel and connect your default printer to the port used in the capture statement.Method 2: In place of the Lotus 1-2-3 print macro, use the XLCALL function.
Example ------- The following Lotus macro prints the selected range: /ppr~agq Use the following in place of the above macro statement. The following runs a Microsoft Excel macro called Print_Macro to print the selected range. {XLCALL Print_Macro}Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.
Microsoft Excel Visual Basic macro example ------------------------------------------ Sub Print_Macro Selection.PrintOut Copies:=1 End Sub MORE INFORMATIONThe Novell Netware Capture command redirects workstation printer output to a network print queue or file. The Capture command uses the following syntax
capture L=x s=sss q=qqq nff nt nb ti=ttwhere:
L refers to the LPT port x = LPT port number (1, 2, or 3) s refers to the server sss = server name q refers to the server print queue qqq = printer queue name nff = no formfeed nt = no tab nb = no banner page ti refers to the retry Timeouts tt = time value (default is 10, 0 disables timeouts) |
KBCategory: kbnetwork kbprint kberrmsg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |