Microsoft KB Archive/68494

Word: Setting a Limit to Print Merge Fields or ASK Instruction

PSS ID Number: Q68494 Article last modified on 11-02-1994

4.00 5.00 5.50 6.00

MS-DOS

= SUMMARY =

It is possible to set a limit on the length of a print merge field or ASK statement by using the MID function. The MID function can be used to extract a specific range of characters from a text string.

The following example could be used to prevent you from typing in too long of a response to an ASK statement:

<> <10>><> <>< > <>

(Where << = CTRL+[ and >> = CTRL+] )

The above print merge example will not continue until less than 10 characters are typed as a result of the ASK statement.

= MORE INFORMATION =

The MID function requires three elements:


 * The string name (a variable or a constant)
 * The starting point of the string extraction
 * The number of characters you want to include in the range

Example
<>

The above command will return the first 10 characters of the variable called “field”.

KBCategory: kbother KBSubcategory: kbmerge Additional reference words: ============================================================================= Copyright Microsoft Corporation 1994.