Skip to main content

ApiParagraph

Represents the ApiParagraph class.

Methods

MethodReturnsDescription
AddElementbooleanAdds an element to the current paragraph.
AddLineBreakApiRunAdds a line break to the current position and starts the next element from a new line.
AddTabStopApiRunAdds a tab stop to the current paragraph.
AddTextApiRunAdds some text to the current paragraph.
CopyApiParagraphCreates a paragraph copy. Ingnore comments, footnote references, complex fields.
DeletebooleanDeletes the current paragraph.
GetClassType"paragraph"Returns a type of the ApiParagraph class.
GetClassType"paraPr"Returns a type of the ApiParaPr class.
GetElementParagraphContentReturns a paragraph element using the position specified.
GetElementsCountnumberReturns a number of elements in the current paragraph.
GetIndFirstLinetwips | undefinedReturns the paragraph first line indentation.
GetIndLefttwips | undefinedReturns the paragraph left side indentation.
GetIndRighttwips | undefinedReturns the paragraph right side indentation.
GetJc"left" | "right" | "both" | "center" | undefinedReturns the paragraph contents justification.
GetNextApiParagraph | nullReturns the next paragraph.
GetOutlineLvlNumberReturns the outline level of the specified properties.
GetParaPrApiParaPrReturns the paragraph properties.
GetPreviousApiParagraphReturns the previous paragraph.
GetSpacingAftertwipsReturns the spacing after value of the current paragraph.
GetSpacingBeforetwipsReturns the spacing before value of the current paragraph.
GetSpacingLineRule"auto" | "atLeast" | "exact" | undefinedReturns the paragraph line spacing rule.
GetSpacingLineValuetwips | line240 | undefinedReturns the paragraph line spacing value.
RemoveAllElementsNoneRemoves all the elements from the current paragraph.\ 💡 When all the elements are removed from the paragraph, a new empty run is automatically created. If you want to add\ content to this run, use the ApiParagraph#GetElement method.
RemoveElementNoneRemoves an element using the position specified.\ 💡 If the element you remove is the last paragraph element (i.e. all the elements are removed from the paragraph),\ a new empty run is automatically created. If you want to add\ content to this run, use the ApiParagraph#GetElement method.
SetBulletNoneSets the bullet or numbering to the current paragraph.
SetHighlightApiParagraphSpecifies a highlighting color which is applied as a background to the contents of the current paragraph.
SetIndFirstLineNoneSets the paragraph first line indentation.
SetIndLeftNoneSets the paragraph left side indentation.
SetIndRightNoneSets the paragraph right side indentation.
SetJcNoneSets the paragraph contents justification.
SetOutlineLvlbooleanSets the outline level for the specified properties.
SetSpacingAfterNoneSets the spacing after the current paragraph. If the value of the isAfterAuto parameter is true, then \ any value of the nAfter is ignored. If isAfterAuto parameter is not specified, then it \ will be interpreted as false.
SetSpacingBeforeNoneSets the spacing before the current paragraph. If the value of the isBeforeAuto parameter is true, then \ any value of the nBefore is ignored. If isBeforeAuto parameter is not specified, then \ it will be interpreted as false.
SetSpacingLineNoneSets the paragraph line spacing. If the value of the sLineRule parameter is either \ "atLeast" or "exact", then the value of nLine will be interpreted as twentieths of a point. If \ the value of the sLineRule parameter is "auto", then the value of the \ nLine parameter will be interpreted as 240ths of a line.
SetTabsNoneSpecifies a sequence of custom tab stops which will be used for any tab characters in the current paragraph.\ -Warning: The lengths of aPos array and aVal array -MUST BE equal to each other.