ApiParagraph
Represents the ApiParagraph class.
Methods
Method | Returns | Description |
---|---|---|
AddBookmarkCrossRef | boolean | Adds a bookmark cross-reference to the current paragraph.\ 💡 Please note that this paragraph must be in the document. |
AddCaption | boolean | Adds a caption paragraph after (or before) the current paragraph.\ 💡 Please note that the current paragraph must be in the document (not in the footer/header).\ And if the current paragraph is placed in a shape, then a caption is added after (or before) the parent shape. |
AddCaptionCrossRef | boolean | Adds a caption cross-reference to the current paragraph.\ 💡 Please note that this paragraph must be in the document. |
AddColumnBreak | ApiRun | Adds a column break to the current position and starts the next element from a new column. |
AddComment | ApiComment | Adds a comment to the current paragraph.\ 💡 Please note that this paragraph must be in the document. |
AddDrawing | ApiRun | Adds a drawing object (image, shape or chart) to the current paragraph. |
AddElement | boolean | Adds an element to the current paragraph. |
AddEndnoteCrossRef | boolean | Adds an endnote cross-reference to the current paragraph.\ 💡 Please note that this paragraph must be in the document. |
AddFootnoteCrossRef | boolean | Adds a footnote cross-reference to the current paragraph.\ 💡 Please note that this paragraph must be in the document. |
AddHeadingCrossRef | boolean | Adds a heading cross-reference to the current paragraph.\ 💡 Please note that this paragraph must be in the document. |
AddHyperlink | ApiHyperlink | null | Adds a hyperlink to a paragraph. |
AddInlineLvlSdt | ApiInlineLvlSdt | Adds an inline container. |
AddLineBreak | ApiRun | Adds a line break to the current position and starts the next element from a new line. |
AddNumberedCrossRef | boolean | Adds a numbered cross-reference to the current paragraph.\ 💡 Please note that this paragraph must be in the document. |
AddPageBreak | ApiRun | Adds a page break and starts the next element from the next page. |
AddPageNumber | ApiRun | Inserts a number of the current document page into the paragraph. |
AddPagesCount | ApiRun | Inserts a number of pages in the current document into the paragraph. |
AddTabStop | ApiRun | Adds a tab stop to the current paragraph. |
AddText | ApiRun | Adds some text to the current paragraph. |
Copy | ApiParagraph | Creates a paragraph copy. Ingnore comments, footnote references, complex fields. |
Delete | boolean | Deletes the current paragraph. |
GetAllCharts | ApiChart[] | Returns a collection of chart objects in the paragraph. |
GetAllContentControls | ApiInlineLvlSdt[] | Returns a collection of content control objects in the paragraph. |
GetAllDrawingObjects | Drawing[] | Returns a collection of drawing objects in the paragraph. |
GetAllImages | ApiImage[] | Returns a collection of image objects in the paragraph. |
GetAllOleObjects | ApiOleObject[] | Returns a collection of OLE objects in the paragraph. |
GetAllShapes | ApiShape[] | Returns a collection of shape objects in the paragraph. |
GetClassType | "paragraph" | Returns a type of the ApiParagraph class. |
GetClassType | "paraPr" | Returns a type of the ApiParaPr class. |
GetElement | ParagraphContent | Returns a paragraph element using the position specified. |
GetElementsCount | number | Returns a number of elements in the current paragraph. |
GetFontNames | string[] | Returns all font names from all elements inside the current paragraph. |
GetIndFirstLine | twips | undefined | Returns the paragraph first line indentation. |
GetIndLeft | twips | undefined | Returns the paragraph left side indentation. |
GetIndRight | twips | undefined | Returns the paragraph right side indentation. |
GetJc | "left" | "right" | "both" | "center" | undefined | Returns the paragraph contents justification. |
GetLastRunWithText | ApiRun | Returns the last Run with text in the current paragraph. |
GetNext | ApiParagraph | null | Returns the next paragraph. |
GetNumbering | ApiNumberingLevel | Returns the numbering definition and numbering level for the numbered list. |
GetOutlineLvl | Number | Returns the outline level of the specified properties. |
GetParaPr | ApiParaPr | Returns the paragraph properties. |
GetParagraphMarkTextPr | ApiTextPr | Returns the text properties of the paragraph mark which is used to mark the paragraph end. The mark can also acquire\ common text properties like bold, italic, underline, etc. |
GetParentContentControl | ApiBlockLvlSdt | null | Returns a content control that contains the current paragraph. |
GetParentTable | ApiTable | null | Returns a table that contains the current paragraph. |
GetParentTableCell | ApiTableCell | null | Returns a table cell that contains the current paragraph. |
GetPosInParent | Number | Returns the paragraph position within its parent element. |
GetPrevious | ApiParagraph | Returns the previous paragraph. |
GetRange | ApiRange | Returns a Range object that represents the part of the document contained in the specified paragraph. |
GetSection | ApiSection | Returns the paragraph section. |
GetShd | ApiRGBColor | Returns the shading applied to the contents of the paragraph. |
GetSpacingAfter | twips | Returns the spacing after value of the current paragraph. |
GetSpacingBefore | twips | Returns the spacing before value of the current paragraph. |
GetSpacingLineRule | "auto" | "atLeast" | "exact" | undefined | Returns the paragraph line spacing rule. |
GetSpacingLineValue | twips | line240 | undefined | Returns the paragraph line spacing value. |
GetStyle | ApiStyle | Returns the paragraph style method. |
GetText | string | Returns the paragraph text. |
GetTextPr | ApiTextPr | Returns the paragraph text properties. |
InsertInContentControl | ApiParagraph | ApiBlockLvlSdt | Wraps the paragraph object with a rich text content control. |
InsertParagraph | ApiParagraph | null | Inserts a paragraph at the specified position. |
Last | ParagraphContent | Returns the last element of the paragraph which is not empty. |
Push | boolean | Adds an element to the current paragraph. |
RemoveAllElements | None | Removes 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. |
RemoveElement | None | Removes 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. |
ReplaceByElement | boolean | Replaces the current paragraph with a new element. |
Search | ApiRange[] | Searches for a scope of a paragraph object. The search results are a collection of ApiRange objects. |
Select | boolean | Selects the current paragraph. |
SetBetweenBorder | None | Specifies the border which will be displayed between each paragraph in a set of paragraphs which have the same set of paragraph border settings. |
SetBold | ApiParagraph | Sets the bold property to the text character. |
SetBottomBorder | None | Specifies the border which will be displayed below a set of paragraphs which have the same paragraph border settings.\ 💡 The paragraphs of the same style going one by one are considered as a single block, so the border is added\ to the whole block rather than to every paragraph in this block. |
SetCaps | ApiParagraph | Specifies that any lowercase characters in this paragraph are formatted for display only as their capital letter character equivalents. |
SetColor | ApiParagraph | Sets the text color to the current paragraph in the RGB format. |
SetContextualSpacing | None | Specifies that any space before or after this paragraph set using the \ ApiParaPr#SetSpacingBefore or ApiParaPr#SetSpacingAfter spacing element, should not be applied when the preceding and \ following paragraphs are of the same paragraph style, affecting the top and bottom spacing respectively. |
SetDoubleStrikeout | ApiParagraph | Specifies that the contents of this paragraph are displayed with two horizontal lines through each character displayed on the line. |
SetFontFamily | ApiParagraph | Sets all 4 font slots with the specified font family. |
SetFontSize | ApiParagraph | Sets the font size to the characters of the current paragraph. |
SetHighlight | ApiParagraph | Specifies a highlighting color which is applied as a background to the contents of the current paragraph. |
SetIndFirstLine | None | Sets the paragraph first line indentation. |
SetIndLeft | None | Sets the paragraph left side indentation. |
SetIndRight | None | Sets the paragraph right side indentation. |
SetItalic | ApiParagraph | Sets the italic property to the text character. |
SetJc | None | Sets the paragraph contents justification. |
SetKeepLines | None | Specifies that when rendering the document using a page view, all lines of the current paragraph are maintained on a single page whenever possible. |
SetKeepNext | None | Specifies that when rendering the document using a paginated view, the contents of the current paragraph are at least\ partly rendered on the same page as the following paragraph whenever possible. |
SetLeftBorder | None | Specifies the border which will be displayed at the left side of the page around the specified paragraph. |
SetNumPr | None | Specifies that the current paragraph references a numbering definition instance in the current document. |
SetNumbering | None | Specifies that the current paragraph references the numbering definition instance in the current document. |
SetOutlineLvl | boolean | Sets the outline level for the specified properties. |
SetPageBreakBefore | None | Specifies that when rendering the document using a paginated view, the contents of the current paragraph are rendered at\ the beginning of a new page in the document. |
SetPosition | ApiParagraph | Specifies an amount by which text is raised or lowered for this paragraph in relation to the default\ baseline of the surrounding non-positioned text. |
SetRightBorder | None | Specifies the border which will be displayed at the right side of the page around the specified paragraph. |
SetSection | boolean | Sets the specified section to the current paragraph. |
SetShd | None | Specifies the shading applied to the contents of the paragraph. |
SetSmallCaps | ApiParagraph | Specifies that all the small letter characters in this paragraph 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. |
SetSpacing | ApiParagraph | Sets the text spacing measured in twentieths of a point. |
SetSpacingAfter | None | Sets 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. |
SetSpacingBefore | None | Sets 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. |
SetSpacingLine | None | Sets 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. |
SetStrikeout | ApiParagraph | Specifies that the contents of this paragraph are displayed with a single horizontal line through the center of the line. |
SetStyle | None | The paragraph style base method.\ 💡 This method is not used by itself, as it only forms the basis for the ApiParagraph#SetStyle method which sets the selected or created style for the paragraph. |
SetTabs | None | Specifies 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. |
SetTextPr | boolean | Sets the paragraph text properties. |
SetTopBorder | None | Specifies the border which will be displayed above a set of paragraphs which have the same set of paragraph border settings.\ 💡 The paragraphs of the same style going one by one are considered as a single block, so the border is added to the whole block rather than to every paragraph in this block. |
SetUnderline | ApiParagraph | Specifies that the contents of this paragraph are displayed along with a line appearing directly below the character\ (less than all the spacing above and below the characters on the line). |
SetVertAlign | ApiParagraph | null | Specifies the alignment which will be applied to the contents of this paragraph in relation to the default appearance of the paragraph text:\ -"baseline" - the characters in the current paragraph will be aligned by the default text baseline.\ -"subscript" - the characters in the current paragraph will be aligned below the default text baseline.\ -"superscript" - the characters in the current paragraph will be aligned above the default text baseline. |
SetWidowControl | None | Specifies whether a single line of the current paragraph will be displayed on a separate page from the remaining content at display time by moving the line onto the following page. |
ToJSON | JSON | Converts the ApiParagraph object into the JSON object. |
ToJSON | JSON | Converts the ApiParaPr object into the JSON object. |
WrapInMailMergeField | None | Wraps the paragraph content in a mail merge field. |