Loads a file in RTF in an RTF control (found in a window or in a WINDEV report).
Caution: The tables and the images found in the RTF document cannot be retrieved.
// Load the "C:\Temp\ExampleFile.RTF" file in the EDT_Edit1 control
<Result> = RTFLoad(<Name of the RTF control> , <RTF file name>)
- True if the file was loaded,
- False otherwise. The error status report is returned by ErrorInfo.
<Name of the RTF control>: Character string
Name of the RTF control to be used.
<RTF file name>: Character string
Name of the RTF file to open. This file can be found on a disk accessible from the current computer or in the application library (WDL).
The format of RTF files supported by WINDEV is the same as the RTF format supported by "Wordpad" (up to Windows XP). Some additional limits must be noticed when exporting a report to an RTF document (the tables are not supported for instance).
If the RTF file is generated by another tool (Word, etc.), it is recommended to open the file with Wordpad to check the RTF compatibility. The display of the file in Wordpad will provide a better preview of what will be printed.
In all cases, we recommend that you re-save the file in Wordpad to force the RTF format.
In WINDEV, RTFLoad forces the use of RTF. Simply use RTFLoad to assign the file to the RTF control