Share via


ITextRangeProvider.MoveEndpointByUnit Method

Definition

Moves one endpoint of the text range the specified number of text units within the document range.

public:
 int MoveEndpointByUnit(TextPatternRangeEndpoint endpoint, TextUnit unit, int count);
int MoveEndpointByUnit(TextPatternRangeEndpoint const& endpoint, TextUnit const& unit, int const& count);
public int MoveEndpointByUnit(TextPatternRangeEndpoint endpoint, TextUnit unit, int count);
function moveEndpointByUnit(endpoint, unit, count)
Public Function MoveEndpointByUnit (endpoint As TextPatternRangeEndpoint, unit As TextUnit, count As Integer) As Integer

Parameters

endpoint
TextPatternRangeEndpoint

The endpoint to move.

unit
TextUnit

The text measure unit for moving.

count
Int32

int

The number of units to move. A positive value moves the endpoint forward. A negative value moves it backward. A value of 0 has no effect.

Returns

Int32

int

The number of units actually moved, which can be less than the number requested if moving the endpoint runs into the beginning or end of the document.

Applies to