TX Text Control ActiveX

Save Method

Method

Saves data in a file with a specified format.

Syntax

TXTextControl.Save FileName[, Offset[, Format[, CurSelection]]]

Parameters

ParameterDescription
FileNameSpecifies the file to save in.
OffsetOptional. Specifies the file position to where the data is to be written when the data of more than one Text Control are to be saved. When not specified or set to -1 the data is appended.
FormatOptional. Specifies a format identifier. When this parameter is not specified the data is saved in the internal Text Control format (3). Otherwise it can be one of the following values:
CurSelectionOptional. When set to True the current selection is saved. When omitted or set to False or when no selection exists all the control contents are saved. This parameter must be set to False if the saving format is XML (10), CSS (11), AdobePDF (12) or AdobePDF/A (14).

Format

ConstantDescription
1 - ANSI textText in Windows ANSI format (an end of a paragraph is marked with the control characters 13 and 10).
2 - TX textText in ANSI format (an end of a paragraph is marked only with the control character 10).
3 - TXText including formatting attributes in the internal Text Control format. Text is stored in ANSI.
4 - HTMLHTML format (Hypertext Markup Language).
5 - RTFRTF format (Rich Text Format).
6 - Unicode textText in Windows Unicode format (an end of a paragraph is marked with the control characters 13 and 10).
7 - TX textText in Unicode format (an end of a paragraph is marked only with the control character 10).
8 - TXText including formatting attributes in the internal Text Control format. Text is stored in Unicode.
9 - Microsoft Word 97-2003Microsoft Word 97-2003 format (*.doc).
10 - XMLXML format (Extensible Markup Language).
11 - CSSCSS format (Cascading Style Sheet).
12 - Adobe PDFAdobe Portable Document Format (PDF).
13 - Microsoft WordMicrosoft Word format (*.docx).
14 - Adobe PDF/AAdobe Portable Document Format Archive (PDF/A).

Return Value

The method returns the position in the file behind the saved data. It is zero if the data could not be saved.

Data Types

NameData type
FileNameString
OffsetLong
FormatInteger
CurSelectionBoolean
Return valueLong

See Also