ITextRange.Expand(TextRangeUnit) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Expands a text range to completely contain any partial text units.
public:
int Expand(TextRangeUnit unit);
int Expand(TextRangeUnit const& unit);
public int Expand(TextRangeUnit unit);
function expand(unit)
Public Function Expand (unit As TextRangeUnit) As Integer
Parameters
- unit
- TextRangeUnit
The text unit to use to expand the range. The default value is Word.
Returns
int
The number of characters added to the text range, if the range was expanded to include a partially contained unit.
Remarks
For example, if the insertion point is at the beginning, the end, or inside a word, the Expand method expands the range to include that word. If the range already includes one word and part of another, Expand expands the range to include both words.