Table of contents
Collapse the table of content
Expand the table of content

SetText Method

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Copies a text string to the DataObject using a specifiedformat. Syntaxobject. SetText(StoreData [, format ] ) The SetText method syntax has these parts:

objectRequired. A valid object.
StoreDataRequired. Defines the data to store on the DataObject.
formatOptional. An integer or string specifying the format of StoreData. When retrieving data from the DataObject, the format identifies the piece of data to retrieve.

Settings The settings for format are:

1Text format.
A string or integer value other than 1A user-defined DataObject format.

Remarks The DataObject stores data according to its format. When the user supplies a string, the DataObject saves the text under the specified format. If the DataObject contains data in the same format as new data, the new data replaces the existing data in the DataObject. If the new data is in a new format, the new data and the new format are both added to the DataObject, and the previously existing data is there as well. If no format is specified, the SetText method assigns the Text format to the text string. If a new format is specified, the DataObject registers the new format with the system.

© 2018 Microsoft