GetParagraph
Get a paragraph from all paragraphs that are in the range
Parameters:
Name |
Type |
Description |
nPos |
Number
|
position |
Returns:
- Type
-
ApiParagraph | null
Example
Copy code
builder.CreateFile("docx");
oDocument = Api.GetDocument();
oFParagraph = oDocument.GetElement(0);
oFParagraph.AddText("First paragraph");
oSParagraph = Api.CreateParagraph();
oSParagraph.AddText("Second Paragraph");
oDocument.Push(oSParagraph);
oRange = oDocument.GetRange(0, 28);
oRangeParagraph = oRange.GetParagraph(1);
oRangeParagraph.SetBold("true");
builder.SaveFile("docx", "GetParagraph.docx");
builder.CloseFile();
Resulting document