Udostępnij za pośrednictwem


ITextRange.Expand(TextRangeUnit) Method

Definition

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

Int32

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.

Applies to