Skip to main content

ApiRun

Represents the ApiRun class.

Methods

MethodReturnsDescription
AddColumnBreakNoneAdds a column break to the current run position and starts the next element from a new column.
AddCommentApiCommentAdds a comment to the current run.\ 💡 Please note that this run must be in the document.
AddDrawingbooleanAdds a drawing object (image, shape or chart) to the current text run.
AddHyperlinkApiHyperlink | nullAdds a hyperlink to the current run.
AddLineBreakNoneAdds a line break to the current run position and starts the next element from a new line.
AddPageBreakNoneAdds a page break and starts the next element from a new page.
AddTabStopNoneAdds a tab stop to the current run.
AddTextNoneAdds some text to the current run.
ClearContentNoneClears the content from the current run.
CopyApiRunCreates a copy of the current run.
DeleteNoneDeletes the current run.
GetBoldbooleanGets the bold property from the current text properties.
GetCapsbooleanSpecifies whether the text with the current text properties are capitalized.
GetClassType"run"Returns a type of the ApiRun class.
GetClassType"textPr"Returns a type of the ApiTextPr class.
GetColorApiRGBColorGets the RGB color from the current text properties.
GetDoubleStrikeoutbooleanGets the double strikeout property from the current text properties.
GetFontFamilystringGets the font family from the current text properties.
GetFontNamesstring[]Returns all font names from all elements inside the current run.
GetFontSizehpsGets the font size from the current text properties.
GetHighlightstringGets the highlight property from the current text properties.
GetItalicbooleanGets the italic property from the current text properties.
GetLanguagestringGets the language from the current text properties.
GetOutLineApiStrokeGets the text outline from the current text properties.
GetParentContentControlApiBlockLvlSdt | ApiInlineLvlSdt | nullReturns a content control that contains the current run.
GetParentTableApiTable | nullReturns a table that contains the current run.
GetParentTableCellApiTableCell | nullReturns a table cell that contains the current run.
GetPositionhpsGets the text position from the current text properties measured in half-points (1/144 of an inch).
GetRangeApiRangeReturns a Range object that represents the part of the document contained in the specified run.
GetShdApiRGBColorGets the text shading from the current text properties.
GetSmallCapsbooleanSpecifies whether the text with the current text properties are displayed capitalized two points smaller than the actual font size.
GetSpacingtwipsGets the text spacing from the current text properties measured in twentieths of a point.
GetStrikeoutbooleanGets the strikeout property from the current text properties.
GetStyleApiStyleGets the style of the current text properties.
GetTextstringReturns a text from the text run.
GetTextFillApiFillGets the text fill from the current text properties.
GetTextPrApiTextPrReturns the text properties of the current run.
GetUnderlinebooleanGets the underline property from the current text properties.
GetVertAlignstringGets the vertical alignment type from the current text properties.
MoveCursorToPosbooleanMoves a cursor to a specified position of the current text run.\ If the current run is not assigned to any document part, then -false is returned. Otherwise, this method returns -true.\ If there is any selection in the document, it will be removed.
RemoveAllElementsNoneRemoves all the elements from the current run.
SelectbooleanSelects the current run.
SetBoldApiTextPrSets the bold property to the text character.
SetBoldApiTextPrSets the bold property to the text character.
SetCapsApiTextPrSpecifies that any lowercase characters in the current text run are formatted for display only as their capital letter character equivalents.
SetCapsApiTextPrSpecifies that any lowercase characters in the text run are formatted for display only as their capital letter character equivalents.
SetColorApiTextPrSets the text color for the current text run in the RGB format.
SetColorApiTextPrSets the text color to the current text run in the RGB format.
SetDoubleStrikeoutApiTextPrSpecifies that the contents of the current run are displayed with two horizontal lines through each character displayed on the line.
SetDoubleStrikeoutApiTextPrSpecifies that the contents of the run are displayed with two horizontal lines through each character displayed on the line.
SetFontFamilyApiTextPrSets all 4 font slots with the specified font family.
SetFontFamilyApiTextPrSets all 4 font slots with the specified font family.
SetFontSizeApiTextPrSets the font size to the characters of the current text run.
SetFontSizeApiTextPrSets the font size to the characters of the current text run.
SetHighlightApiTextPrSpecifies a highlighting color which is applied as a background to the contents of the current run.
SetHighlightApiTextPrSpecifies a highlighting color which is added to the text properties and applied as a background to the contents of the current run/range/paragraph.
SetItalicApiTextPrSets the italic property to the text character.
SetItalicApiTextPrSets the italic property to the text character.
SetLanguageApiTextPrSpecifies the languages which will be used to check spelling and grammar (if requested) when processing\ the contents of this text run.
SetLanguageApiTextPrSpecifies the languages which will be used to check spelling and grammar (if requested) when processing\ the contents of the text run.
SetOutLineApiTextPrSets the text outline to the current text run.
SetPositionApiTextPrSpecifies an amount by which text is raised or lowered for this run in relation to the default\ baseline of the surrounding non-positioned text.
SetPositionApiTextPrSpecifies an amount by which text is raised or lowered for this run in relation to the default\ baseline of the surrounding non-positioned text.
SetShdApiTextPrSpecifies the shading applied to the contents of the current text run.
SetShdApiTextPrSpecifies the shading applied to the contents of the current text run.
SetSmallCapsApiTextPrSpecifies that all the small letter characters in this text run are formatted for display only as their capital\ letter character equivalents which are two points smaller than the actual font size specified for this text.
SetSmallCapsApiTextPrSpecifies that all the small letter characters in the text run are formatted for display only as their capital\ letter character equivalents which are two points smaller than the actual font size specified for this text.
SetSpacingApiTextPrSets the text spacing measured in twentieths of a point.
SetSpacingApiTextPrSets the text spacing measured in twentieths of a point.
SetStrikeoutApiTextPrSpecifies that the contents of the current run are displayed with a single horizontal line through the center of the line.
SetStrikeoutApiTextPrSpecifies that the contents of the run are displayed with a single horizontal line through the center of the line.
SetStyleApiTextPrSets a style to the current run.
SetStyleApiTextPrThe text style base method.\ 💡 This method is not used by itself, as it only forms the basis for the ApiRun#SetStyle method which sets\ the selected or created style to the text.
SetTextFillApiTextPrSets the text fill to the current text run.
SetTextPrApiTextPrSets the text properties to the current run.
SetUnderlineApiTextPrSpecifies that the contents of the current run are displayed along with a line appearing directly below the character\ (less than all the spacing above and below the characters on the line).
SetUnderlineApiTextPrSpecifies that the contents of the run are displayed along with a line appearing directly below the character\ (less than all the spacing above and below the characters on the line).
SetVertAlignApiTextPrSpecifies the alignment which will be applied to the contents of the current run in relation to the default appearance of the text run:\ -"baseline" - the characters in the current text run will be aligned by the default text baseline.\ -"subscript" - the characters in the current text run will be aligned below the default text baseline.\ -"superscript" - the characters in the current text run will be aligned above the default text baseline.
SetVertAlignApiTextPrSpecifies the alignment which will be applied to the contents of the run in relation to the default appearance of the run text:\ -"baseline" - the characters in the current text run will be aligned by the default text baseline.\ -"subscript" - the characters in the current text run will be aligned below the default text baseline.\ -"superscript" - the characters in the current text run will be aligned above the default text baseline.
ToJSONJSONConverts the ApiRun object into the JSON object.
ToJSONJSONConverts the ApiTextPr object into the JSON object.
WrapInMailMergeFieldNoneWraps a run in a mail merge field.