f$Word: Insert RTF file
f$Word: Insert RTF file
Insert an RTF text component to the current position.
The text can be saved as an RTF-format (Rich Text Format) file, but also unformatted "normal" texts are possible.
These RTF components can be extracted from the database using the specific function. RTF texts cannot be read directly on an ePOS parameter and be inserted as a text, as a conversion from RTF to Word is not possible in this case.
If desired, the formatting of the text can also be set using a specific text component, which is received in the transfer parameter Component , e.g. if the text is to be indented. In order to position the text the text component must contain an field function INSERTTEXT. As a document in this case the field function DOCVARIABLE has to be used with the variable name RTFFILE. This field then is substituted by the text from the database.
Tip:
A second option to ident an RTF text specifically is by f$Word:InsertTable first inserting a table and then force an ident and a right-alignment by inserting an RTF component into this table. The text inserted with this function may not contain any document variables.
Syntax: | Status = f$Word('InsertRTF','File','Component') | ||
| Argument | Type | Meaning |
| 'InsertRTF' | String | Keyword |
| File | String | Name of the RTF file to be inserted incl. Path and filed extension (.rtf) |
| Component | String | '' for direct insertion of the RTF-file File name, if the RTF-file is to be inserted directly using the field function {EINFÜGENTEXT {DOCVARIABLE RTFDATEI} }. |
Result: | Integer | 0: Command successfully executed -1: The component of interest cannot be inserted. | |
Example: | Status = f$Word('InsertRTF',patch + '\\rtffile.rtf','') | ||