This class is designed for Mail-Merging text documents such as plain text, HTML, or RTF (Rich Text Format)

While word processing documents can be created with Word Automation, merging it ourselves in VFP is simpler and has less dependencies.
RTF documents are word processing documents that can be edited with Word, WordPad, WordPerfect, etc.
Since WordPad is included with every copy of Windows, this Mail-Merge technique does not require Word to be installed on the user's computer.

Mail-Merge is the process of merging together a template document with live data.

THe live data consists of any valid FoxPro expression such as a field from a table, an in-scope variable, a FoxPro function, etc.
The expression can return a string, integer, date, etc.

I use [[ and ]] to delimit variables in this example, but you could use anything


Example.prg shows example usage.
It uses customer.dbf for data and FormLetter.rtf as a merge document.

The example Formletter.rtf shows one BAD merge variable as an example.

Enjoy!
Michael Cummings
LaFox@MichaelRCummings.com