Microsoft KB Archive/101260

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 09:06, 20 July 2020 by X010 (talk | contribs) (Text replacement - ">" to ">")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Excel: Using LINE.PRINT to Print Multiple Lines on a Page



The information in this article applies to:


  • Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0





SUMMARY

Normally the LINE.PRINT() function performs a form feed operation after it has printed. As a result, only one LINE.PRINT() job prints on a page. This article explains how to use the LINE.PRINT() function to print one or more lines of text to a single page.



MORE INFORMATION

The LINE.PRINT() macro function prints the active document using methods compatible with those of Lotus 1-2-3.

NOTE: LINE.PRINT() does not use the Microsoft Windows printer drivers.


Example

The following macro example sends a line of text to a printed log whenever the current time is past 10:00 A.M. (it does not perform a form feed operation after the print job, and therefore prints each line on the same page):


   A1:     Print_Macro
   A2:     =IF(NOW()>=TIME(10,0,0))
   A3:        =LINE.PRINT(5,,,,0,0,2,FALSE)
   A4:        =LINE.PRINT(1)
   A5:     =END.IF()
   A6:     =RETURN() 



The arguments for this function are:


  • LINE.PRINT(LINE.PRINT(command,setup_text,leftmarg,rightmarg, topmarg,botmarg,pglen,formatted)
  • The command argument 5, in cell A3, tells Microsoft Excel to set up the page formats. The remaining arguments format the page without top or bottom margins, a page length of two lines (allowing for a blank line between each printed line), and no headers or footers.
  • The command argument 1, in cell A4, tells Microsoft Excel to print the currently defined print area on the active worksheet.

NOTE: The above settings are saved in the [Line Print] section of your EXCEL4.INI or EXCEL5.INI file. The "Function Reference," version 4.0, incorrectly states that this information is saved to the EXCEL.INI file.



REFERENCES

"Online Help," version 5.0
"Function Reference," version 4.0, pages 253-254

Additional query words: 4.0 4.00a 5.0 howto

Keywords :
Version : 4.00 4.00a 5.00
Platform : WINDOWS
Issue type :
Technology :


Last Reviewed: April 5, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.