Excel: Using LINE.PRINT to Change Global and Document Settings

ID: Q104410


The information in this article applies to:


SUMMARY

In Microsoft Excel, you can use the LINE.PRINT() function to set the global line printing options in the EXCEL4.INI file (EXCEL5.INI file in version 5.0). You can also set the document line printing options for an individual document.

If you set the LINE.PRINT() command argument to 1, you can print the active document using Lotus 1-2-3-compatible methods. However, unless you have a specific need to use the LINE.PRINT() function, use the PRINT() function instead.


MORE INFORMATION

Microsoft provides macro examples 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. This macro is provided 'as is' and Microsoft does not guarantee that the following code can be used in all situations. Microsoft does not support modifications of the code to suit customer requirements for a particular purpose.

Changing the Global Settings in the EXCEL4.INI (or EXCEL5.INI) File

To change the global settings in the [Line Print] section of the EXCEL4.INI (or EXCEL5.INI) file, do either of the following:

Changing the Settings for the Active Document Only

To change only the active document's settings without making changes to the EXCEL4.INI (or EXCEL5.INI) file, use Syntax 2 of the LINE.PRINT() function:


   =LINE.PRINT(5,,0,132,,,,,,,TRUE) 


This function will change the document settings (when you run this macro, the document you want to change must be active).

The default settings for the [Line Print] section of the EXCEL4.INI (or EXCEL5.INI) file are shown below:


   [Line Print]
   Comment=This section controls Lotus macro line printing settings.
   Options=2
   LeftMarg=4
   RightMarg=76
   TopMarg=2
   BotMarg=2
   PgLen=66
   Setup= 


NOTE: These settings may be different for your file if you have made changes to the default settings.


REFERENCES

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

Additional query words: 4.0 4.00a 5.0


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

Last Reviewed: April 7, 1999