|
|
|
|
- Properties specific to the description of docNumberingLevel variables
- Adding a numbering description to a document
- Adding a numbering level to a document
- Using numberings created programmatically
docNumberingLevel (Type of variable) In french: docNiveauNumérotation
The docNumberingLevel type is used to define the advanced characteristics of a numbering level used in a Word Processing document. The characteristics of this numbering level can be defined and changed using different WLanguage properties. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. MyDoc is Document = WP_NoName1 MyNumbering is docNumbering Level is docNumberingLevel  // Define the numbering  // 1st numbering level Level.Text = "%1) " Level.Text = "%1) " Level.InitialValue = 1 Level.PageLayout.IndentFirstLine = 10 Level.Format = numfRomanUppercase Add(MyNumbering.Level, Level)  // Second numbering level Level.Text = "%2] " Level.InitialValue = 1 Level.PageLayout.IndentFirstLine = 20 Level.Format = numfUppercaseLetter Add(MyNumbering.Level, Level)  // Third numbering level Level.Text = "%3\ " Level.InitialValue = 1 Level.PageLayout.IndentFirstLine = 30 Level.Format = numfLowercaseLetter Add(MyNumbering.Level, Level)   // Add the numbering to the document let id = Add(MyDoc.Numbering, MyNumbering)  // Define the numbering associated with paragraph 1 MyDoc.Paragraph[1].Numbering.Identifier = id MyDoc.Paragraph[1].Numbering.Level = 1  // Display the document in the Word Processing control WP_NoName1 = MyDoc
Remarks Properties specific to the description of docNumberingLevel variables The following properties can be used to handle a numbering level: | | | | Property name | Type used | Effect |
---|
Alignment | Integer constant | The numbering is positioned in relation to the start position of the paragraph: - haCenter: The numbering is centered in relation to the beginning of the paragraph.
- haRight: The numbering is positioned on the right in relation to the beginning of the paragraph.
- haLeft: The numbering is positioned on the left in relation to the beginning of the paragraph.
| Format | Integer constant | Formatting for this level of numbering (digits, roman digits, letters, ...): - numfUppercaseLetter: Numbering in uppercase letters: A, B, C, D, ...
- numfLowercaseLetter: Numbering in lowercase letters: a, b, c, d, ...
- numfNumeric: Numbering in digits: 1, 2, 3, 4, ...
- numfNumericInLetters: Numbering in digits written in letters: one, two, three, four, ...
- numfOrdinal: Ordered numbering: 1st, 2nd, 3rd, etc.
- numfOrdinalInLetters: Ordered numbering in letters: first, second, third, ...
- numfBullet: Numbering in bullet format. Only the bullets represented by a font character are available. You cannot create a bullet associated with an image.
- numfRomanUppercase: Numbering in uppercase Roman digits: I, II, III, ...
- numfRomanLowercase: Numbering in lowercase Roman digits: i, ii, iii, ...
| Formatting | docFormatting variable | Parameters for numbering formatting. | PageLayout | | Layout of numbered paragraph. | | PageLayout.Alignment | Integer constant | Horizontal alignment used for the numbered paragraph: - haCenter: Centered
- haRight: Aligned to right
- haLeft: Aligned to left
- haJustified: Justified.
| | PageLayout.Border | Border variable | Characteristics of border used for the numbered paragraph. Remark: the rounded corners are not supported. | | PageLayout.BackgroundColor | Integer | Background color of numbered paragraph. This color can correspond to: | | PageLayout.SpacingAfter | Real | Spacing after the numbered paragraph (expressed in millimeters). This property is set to 0 by default. | | PageLayout.SpacingBefore | Real | Spacing before the numbered paragraph (expressed in millimeters). This property is set to 0 by default. | | PageLayout.Interline | Real | Line spacing (expressed in millimeters). Used if the InterlineType property is set to interlineExact or interlineMinimum. By default, this property is set to 0. | | PageLayout.RightIndent | Real | Right indent of numbered paragraph (expressed in millimeters). This property is set to 0 by default. | | PageLayout.LeftIndent | Real | Left indent of numbered paragraph (expressed in millimeters). This property is set to 0 by default. | | PageLayout.IndentFirstLine | Real | Indent of first line in numbered paragraph (expressed in millimeters). This property is set to 0 by default. | | PageLayout.CustomTabulation | Array of docTabulation | Custom tabulations of numbered paragraph. | | PageLayout.BackgroundPattern | Background variable | Characteristics of the paragraph background. | | PageLayout.InterlineType | Integer constant | Type of line spacing used: - interlineExact: The line spacing corresponds to the value of the Interline property.
- interlineMinimum: The line spacing is at least the value of the Interline property. If the default line spacing of the font used on the previous line is greater than the Interline property, the default line spacing of the font is used.
- interlineMultiple (default value): The line spacing is obtained by multiplying the Interline property by the default line spacing of the font of the previous line and dividing the result by 240.
| RestartAfter | Integer | Level after which the numbering must be reinitialized. This property can correspond to: - 0: the numbering is never reinitialized.
- -1: the numbering is reinitialized as soon as a higher level is incremented.
- a value x greater than 0: the numbering is reinitialized as soon as the level x is incremented.
| Separator | Integer constant | Type of separator used to perform the spacing between the paragraph numbering and the rest of text: - numsepNone: No separator.
- numsepSpace: The separator is a space.
- numsepTabulation: The separator is a tabulation.
| Text | Character string | Numbering to use. The % symbol followed by a digit will contain the numbering value for the level defined by this digit. Examples: - "%1 )" uses the numbering of level 1 followed by a bracket.
- "%1. %2" displays the numbering of level 1 followed by the numbering of level 2.
For a list with bullets, characters representing the requested bullet. This character will be displayed in the font selected for the numbering formatting. Caution: The number of previous levels will be formatted as defined by the previous level, except if the AllInDigit property is set to True. | AllInDigit | Boolean | - True in order for all the level numbers (current level and previous levels) to be written in Arabic digits,
- False to keep the characteristics of each level.
| Tplc | Character string | Specific identifier for MS Word. This property is read-only. | InitialValue | Integer | Start value of numbering (must be a positive integer). |
Adding a numbering description to a document To add a numbering description to a document, you have the ability to use Add with the following syntax: Add(MyDocument.Numbering, MyNumbering) where: Adding a numbering level to a document To add a numbering level to a document, you have the ability to use Add with the following syntax: Add(Numbering.Level, MyLevel) where: - Numbering is a variable of type docNumbering.
- MyLevel is a variable of type docNumberingLevel.
Using numberings created programmatically The numberings created programmatically can be used via the ribbon. They appear in the ribbon, in the "Paragraphs" group, by expanding the  option, in the "Document numbering" group.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|