AllDataFromFile Property


Top  Previous  Next


Returns or sets whether Smart Print Control should retrieve all document data (title, body text, header and footer) from the text file specified in the FileName property.


Syntax

object.AllDataFromFile [=boolean]

Where object evaluates to a Smart Print Control.


The settings for boolean are:

TrueSpecifies that the control should retrieve document title, body text, header and footer from the text file specified in the FileName property (see remarks below).  
False(Default). Specifies that the control should only retrieve the document text from the text file.  



Remarks

If this property is set to True, Smart Print Control will assume that all document data (title, body text, header and footer) should be read from the text file specified in the FileName property. The format of the text file must comply with the following format:

Document title text   (must be on the first line in the file)  
Document header text   (must be on the second line in the file)  
Document footer text   (must be on the third line in the file)  
Document body text    (starts on the fourth line in the file)  

For example, the text file should show as in the example below when opened in a text editor like Notepad:


Smart Print Control Demo
Header Demo
Footer Demo
Smart Print Control greatly simplifies printing tasks in VB....


Note: If you want to supply only the document title and text (no header and footer), just leave the second line (header) and third line (footer) blank in the file. The title must still be on the first line and the document text starts on the fourth line.

You don't have to worry about the number of characters on each line in the file; long lines will be wrapped by the control when the file is printed.