Types the string given by bstr at this selection as if someone typed it. This is similar to the underlying SetText method, but is sensitive to the Insert/Overtype key state and UI settings like AutoCorrect and smart quotes.
HRESULT TypeText( BSTR bstr );
String to type into this selection.
The method returns an HRESULT value. If the method succeeds, it returns S_OK. If the method fails, it returns one of the following error codes. For more information about COM error codes, see Error Handling in COM.
||Text is write-protected.|
||bstr is null.|
||Out of memory.|
This method types the string given by bstr at this selection as if someone typed it. Using TypeText is faster than sending characters through the SendMessagefunction, but it is slower than using SetText.
TypeText is similar to the underlying SetText method, however, it is sensitive to the Insert/Overtype key state and UI settings like AutoCorrect and smart quotes. For example, it deletes any nondegenerate selection and then inserts or overtypes (depending on the Insert/Overtype key state—see the SetFlags method) the string bstr at the insertion point, leaving this selection as an insertion point following the inserted text.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|