Back to Devexpress

SectionPageNumbering.FirstPageNumber Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-sectionpagenumbering-dd3802f7.md

latest4.2 KB
Original Source

SectionPageNumbering.FirstPageNumber Property

Gets or sets an initial number from which the numbering starts.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
int FirstPageNumber { get; set; }
vb
Property FirstPageNumber As Integer

Property Value

TypeDescription
Int32

An Int value that is the first page number.

|

Remarks

Reset the numbering options by setting the ContinueNumbering property to false before you apply new options.

The code sample below specifies the initial number and the NumberingFormat.CardinalText numbering format.

csharp
wordProcessor1.Document.Sections[0].PageNumbering.ContinueNumbering = false;
wordProcessor1.Document.Sections[0].PageNumbering.FirstPageNumber = 3;
wordProcessor1.Document.Sections[0].PageNumbering.NumberingFormat = NumberingFormat.CardinalText;
wordProcessor1.Document.Fields.Update();
vb
wordProcessor1.Document.Sections(0).PageNumbering.ContinueNumbering = False
wordProcessor1.Document.Sections(0).PageNumbering.FirstPageNumber = 3
wordProcessor1.Document.Sections(0).PageNumbering.NumberingFormat = NumberingFormat.CardinalText
wordProcessor1.Document.Fields.Update()

The following code snippets (auto-collected from DevExpress Examples) contain references to the FirstPageNumber property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

word-document-api-print-documents/CS/Program.cs#L35

csharp
_section.PageNumbering.NumberingFormat = NumberingFormat.CardinalText;
    _section.PageNumbering.FirstPageNumber = 0;
}

word-document-api-use-printablecomponentlink-to-print-document/CS/PrintingSystem/Form1.cs#L48

csharp
_section.PageNumbering.NumberingFormat = NumberingFormat.CardinalText;
    _section.PageNumbering.FirstPageNumber = 0;
}

word-document-api-print-documents/VB/Program.vb#L23

vb
_section.PageNumbering.NumberingFormat = NumberingFormat.CardinalText
    _section.PageNumbering.FirstPageNumber = 0
Next

word-document-api-use-printablecomponentlink-to-print-document/VB/PrintingSystem/Form1.vb#L48

vb
_section.PageNumbering.NumberingFormat = NumberingFormat.CardinalText
    _section.PageNumbering.FirstPageNumber = 0
Next

See Also

SectionPageNumbering Interface

SectionPageNumbering Members

DevExpress.XtraRichEdit.API.Native Namespace