RunEnd property

Microsoft Visio Developer Reference

RunEnd property

   Example   

Returns the ending index of a type of run—a sequence of characters that share a particular attribute, such as character, paragraph, or tab formatting; or a word, paragraph, or field.

Version added

3.0

Syntax

intRet = object.RunEnd(runType)

intRet

Long. The ending index of the run.

object

Required. An expression that returns a Characters object.

runType

Required Integer. The type of run to get.

Remarks

In a ShapeSheet window, each row in the Character and Paragraph sections represents a run of the corresponding format in a shape's text. Certain words may be bold or italic, or one paragraph may be centered and another left-aligned. Each change of format represents a run of that format. Similarly, delimiters such as spaces and paragraph marks represent the beginning and end of words, paragraphs, and fields.

In addition, you can retrieve rows that represent runs of character, paragraph, and tab formats by specifying a row index as an argument to the CellsSRC property of a shape.

Use the RunEnd property to determine the end of a sequence of identically formatted characters or the end of a word, paragraph, or field. You can check the IsField property to determine whether a run is a field.

The index that the RunEnd property returns is greater than or equal to the ending index of a Characters object. If the End property of the Characters object is already at the end of a run, the value of the RunEnd property is equal to the value of the End property.

Use the runType argument to specify the type of run you want. You can also use any of the constants declared by the Visio type library in VisRunTypes. To find a list of runType values, see the RunBegin property.