ID: Q113921
The information in this article applies to:
A useful feature of the TEXTMERGE command is the ability to output a form letter containing text merge delimited fields that have been stored in the memo field of a database. Unfortunately, the SET MEMOWIDTH TO command is ignored for any memo fields that are embedded in the form letter.
To work around this behavior, use the following user-defined function (UDF), which allows the memo text to appear at the desired location and wrap at the column specified by SET MEMOWIDTH TO.
Assuming a desired width of 35 for the memo field (starting at the 20th column), you can create the UDF as follows:
1. In the Command window, type:
MODIFY COMMAND limit
NOTE: You can replace the UDF name "Limit" with another name, of 8
characters or less, conforming to the MS-DOS file-naming conventions.
2. In the LIMIT.PRG edit window, type the following lines:
SET MEMOWIDTH TO 35
?? Comments AT 20
RETURN ""
To use this solution, replace the memo field name in the form letter with
the name of the UDF. For example, wherever the memo field appears as
"<<Comments>>" in the form letter, it should now say "<<Limit()>>" (without
the quotation marks).
Additional reference words: FoxDos FoxWin 2.50 KBCategory: kbprg KBSubcategory: FxprgGeneral
Last Reviewed: June 27, 1995