Expands this range so that any partial units it contains are completely contained.
HRESULT Expand( long Unit, long *pDelta );
Unit to include, if it is partially within the range. The default value is
tomWord. For a list of the other Unit values, see the discussion under ITextRange.
The count of characters added to the range. The value can be null.
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.
||Unit is not supported.|
||Failure for some other reason.|
For example, if an insertion point is at the beginning, the end, or within a word, ITextRange::Expand expands the range to include that word. If the range already includes one word and part of another, ITextRange::Expand expands the range to include both words. ITextRange::Expand expands the range to include the visible portion of the range's story.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|