GetText method (Microsoft Forms)

Retrieves a text string from the DataObject using the specified format.

Syntax

String = object. GetText( [ format ] )

The GetText method syntax has these parts:

Part Description
object Required. A valid object name.
format Optional. A string or integer specifying the format of the data to retrieve from the DataObject.

Settings

The settings for format are:

Value Description
1 Text format.
A string or any integer other than 1 A user-defined DataObject format passed to the DataObject from SetText.

Remarks

The DataObject supports multiple formats, but only supports one data item of each format. For example, the DataObject might include one text item and one item in a custom format; but cannot include two text items. If no format is specified, the GetText method requests information in the Text format from the DataObject.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.