InputFieldInsert

Description

Inserts a named input field at the insertion point in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtename.InputFieldInsert ( inputfieldname )

Argument

Description

rtename

The name of the RichTextEdit control in which you want to insert an input field

inputfieldname

A string whose value is the name of input field to be inserted. The name does not have to be unique

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If inputfieldname is null, InputFieldInsert returns null.

Usage

There can be several input fields with the same name. Fields of a given name all have the same data value. When you call InputFieldChangeData for a named input field, all fields with that name are changed.

Examples

Example 1

If there is a selection, InputFieldInsert inserts the field at the beginning of the selection. The input field and the selection remain selected:

st_status.Text = String( &

rte_1.InputFieldInsert("lastname"))

See also