Microsoft KB Archive/113921

{| = How to Set Width of Embedded Memos in Text Merge Output =
 * width="100%"|

ID: Q113921

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, and 2.6
 * Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, 2.5b, and 2.6

SUMMARY
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.

MORE INFORMATION
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 "<>" in the form letter, it should now say "<>" (without the quotation marks). Additional reference words: FoxDos FoxWin 2.50 KBCategory: kbprg KBSubcategory: FxprgGeneral
 * }