ApiRun
ApiRun is a subclass of ApiTextPr.
Methods
| Method | Returns | Description |
|---|---|---|
| AddColumnBreak | boolean | Adds a column break to the current run position and starts the next element from a new column. |
| AddComment | ApiComment | Adds a comment to the current run. |
| AddDrawing | boolean | Adds a drawing object (image, shape or chart) to the current text run. |
| AddHyperlink | ApiHyperlink | Adds a hyperlink to the current run. |
| AddLineBreak | boolean | Adds a line break to the current run position and starts the next element from a new line. |
| AddPageBreak | boolean | Adds a page break and starts the next element from a new page. |
| AddTabStop | boolean | Adds a tab stop to the current run. |
| AddText | boolean | Adds some text to the current run. |
| ClearContent | boolean | Clears the content from the current run. |
| Copy | ApiRun | Creates a copy of the current run. |
| Delete | boolean | Deletes the current run. |
| GetBold | boolean | Gets the bold property from the current text properties. |
| GetCaps | boolean | Returns whether the text with the current text properties are capitalized. |
| GetClassType | "run" | Returns a type of the ApiRun class. |
| GetColor | ApiColor | Gets the RGB color from the current text properties. |
| GetDoubleStrikeout | boolean | Gets the double strikeout property from the current text properties. |
| GetFontFamily | string | Returns the font family from the current text properties. |
| GetFontNames | string[] | Returns all font names from all elements inside the current run. |
| GetFontSize | hps | Gets the font size from the current text properties. |
| GetHighlight | string | Gets the highlight property from the current text properties. |
| GetItalic | boolean | Gets the italic property from the current text properties. |
| GetLanguage | string | Gets the language from the current text properties. |
| GetOutLine | ApiStroke | Gets the text outline from the current text properties. |
| GetParentContentControl | ApiBlockLvlSdt | ApiInlineLvlSdt | null | Returns a content control that contains the current run. |
| GetParentParagraph | ApiParagraph | Returns a parent paragraph of the current run. |
| GetParentTable | ApiTable | null | Returns a table that contains the current run. |
| GetParentTableCell | ApiTableCell | null | Returns a table cell that contains the current run. |
| GetPosition | hps | Gets the text position from the current text properties measured in half-points (1/144 of an inch). |
| GetRange | ApiRange | Returns a Range object that represents the part of the document contained in the specified run. |
| GetShd | Shd | undefined | Gets the text shading from the current text properties. |
| GetSmallCaps | boolean | Returns whether the text with the current text properties are displayed capitalized two points smaller than the actual font size. |
| GetSpacing | twips | Gets the text spacing from the current text properties measured in twentieths of a point. |
| GetStrikeout | boolean | Gets the strikeout property from the current text properties. |
| GetStyle | ApiStyle | Gets the style of the current text properties. |
| GetText | string | Returns a text from the text run. |
| GetTextFill | ApiFill | Gets the text fill from the current text properties. |
| GetTextPr | ApiTextPr | Returns the text properties of the current run. |
| GetUnderline | boolean | Gets the underline property from the current text properties. |
| GetVertAlign | string | Gets the vertical alignment type from the current text properties. |
| MoveCursorToPos | boolean | Moves a cursor to a specified position of the current text run. |
| RemoveAllElements | boolean | Removes all the elements from the current run. |
| Select | boolean | Selects the current run. |
| SetBold | ApiTextPr | Sets the bold property to the text character. |
| SetCaps | ApiTextPr | Specifies that any lowercase characters in the current text run are formatted for display only as their capital letter character equivalents. |
| SetColor | ApiTextPr | Sets the text color for the current text run. |
| SetDoubleStrikeout | ApiTextPr | Specifies that the contents of the current run are displayed with two horizontal lines through each character displayed on the line. |
| SetFontFamily | ApiTextPr | Sets all 4 font slots with the specified font family. |
| SetFontSize | ApiTextPr | Sets the font size to the characters of the current text run. |
| SetHighlight | ApiTextPr | Specifies a highlighting color which is applied as a background to the contents of the current run. |
| SetItalic | ApiTextPr | Sets the italic property to the text character. |
| SetLanguage | ApiTextPr | Specifies the languages which will be used to check spelling and grammar (if requested) when processing |
| SetOutLine | ApiTextPr | Sets the text outline to the current text run. |
| SetPosition | ApiTextPr | Specifies an amount by which text is raised or lowered for this run in relation to the default |
| SetShd | ApiTextPr | Specifies the shading applied to the contents of the current text run. |
| SetSmallCaps | ApiTextPr | Specifies that all the small letter characters in this text run are formatted for display only as their capital |
| SetSpacing | ApiTextPr | Sets the text spacing measured in twentieths of a point. |
| SetStrikeout | ApiTextPr | Specifies that the contents of the current run are displayed with a single horizontal line through the center of the line. |
| SetStyle | ApiTextPr | Sets a style to the current run. |
| SetTextFill | ApiTextPr | Sets the text fill to the current text run. |
| SetTextPr | ApiTextPr | Sets the text properties to the current run. |
| SetUnderline | ApiTextPr | Specifies that the contents of the current run are displayed along with a line appearing directly below the character |
| SetVertAlign | ApiTextPr | Specifies the alignment which will be applied to the contents of the current run in relation to the default appearance of the text run: |
| ToJSON | JSON | Converts the ApiRun object into the JSON object. |
| WrapInMailMergeField | boolean | Wraps a run in a mail merge field. |