Use MoveToParagraph to move the cursor to a desired paragraph in the current section. You should pass two parameters to this method: paragraphIndex (the index of the paragraph to move to) and characterIndex (the index of the character inside the paragraph).
The navigation is performed inside the current story of the current section. That is, if you moved the cursor to the primary header of the first section, then paragraphIndex specifies the index of the paragraph inside that header of that section.
When paragraphIndex is greater than or equal to 0, it specifies an index from the beginning of the section with 0 being the first paragraph. When paragraphIndex is less than 0, it specifies an index from the end of the section with -1 being the last paragraph.
The character index can currently only be specified as 0 to move to the beginning of the paragraph or -1 to move to the end of the paragraph.
Example DocumentBuilderMoveToParagraph
Shows how to move a cursor position to the specified paragraph.
[C#]
Document doc = new Document(MyDir + "DocumentBuilder.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToParagraph(2, 0);
builder.Writeln("This is the 3rd paragraph.");
[Visual Basic]
Dim doc As Document = New Document(MyDir & "DocumentBuilder.doc")
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
builder.MoveToParagraph(2, 0)
builder.Writeln("This is the 3rd paragraph.")
[Java]
Document doc = new Document(getMyDir() + "DocumentBuilder.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.moveToParagraph(2, 0);
builder.writeln("This is the 3rd paragraph.");