If you are working with a document that contains multiple sections, you can move to a desired section using MoveToSection. This method moves the cursor to the beginning of a specified section and accepts the index of the required section. When the section index is greater than or equal to 0, it specifies an index from the beginning of the document with 0 being the first section. When the section index is less than 0, it specifies an index from the end of the document with -1 being the last section.
Example DocumentBuilderMoveToSection
Shows how to move a cursor position to the specified section.
[C#]
Document doc = new Document(MyDir + "DocumentBuilder.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToSection(2);
builder.Writeln("This is the 3rd section.");
[Visual Basic]
Dim doc As Document = New Document(MyDir & "DocumentBuilder.doc")
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
builder.MoveToSection(2)
builder.Writeln("This is the 3rd section.")
[Java]
Document doc = new Document(getMyDir() + "DocumentBuilder.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.moveToSection(2);
builder.writeln("This is the 3rd section.");