• Properties specific to the description of docParagraph variables
WINDEV
WEBDEV
WINDEV Mobile
Others
docParagraph (Type of variable)
In french: docParagraphe
The docParagraph type is used to handle the characteristics of a paragraph in a DOCX document. The characteristics of this paragraph can be defined and changed using different WLanguage functions and properties.
This type of variable is used by Document variables.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
WP_MyDoc = DocOpen(fExeDir() + fSep() + "MyDoc.docx")

TextFragment is docFragment(WP_MyDoc, 1, Length(DocToText(WP_MyDoc)))

FOR EACH MyCurrentElement OF TextFragment.Elément
MyParagraph is docParagraph = MyCurrentElement.Paragraph
Trace(MyParagraph.StartPosition)
Trace(MyParagraph.EndPosition)
END
Remarks

Properties specific to the description of docParagraph variables

The following properties can be used to handle a docParagraph variable:
 Type used Effect Property name Cell docCell variable Used to access the cell of parent table. StartSection Integer constant Section break to apply before the paragraph. Can correspond to one of the following constants: ssNoBreak: No section break is found before the paragraph. ssSectionBreak: A section break (page break type) is found before the paragraph. ssSectionBreakContinuous: A continuous section break is found before the paragraph. ssSectionBreakOddPage: A section break (odd page break type) is found before the paragraph. ssSectionBreakEvenPage: A section break (even page break type) is found before the paragraph. Remarks: The EndSection property of a paragraph returns the same value as the StartSection property of the next paragraph. The StartSection property of the first paragraph returns the ssNoBreak constant. Element Array of docElement Elements included in the paragraph. The elements found in the paragraph can be browsed via the FOR EACH statement. EndSection Integer constant Section break to apply after the paragraph. Can correspond to one of the following constants: ssNoBreak: No section break is found after the paragraph. ssSectionBreak: A section break (page break type) is found after the paragraph. ssSectionBreakContinuous: A continuous section break is found after the paragraph. ssSectionBreakOddPage: A section break (odd page break type) is found after the paragraph. ssSectionBreakEvenPage: A section break (even page break type) is found after the paragraph. Remarks: The EndSection property of a paragraph returns the same value as the StartSection property of the next paragraph. The EndSection property of the last paragraph returns the ssNoBreak constant. ParagraphIndex Integer Index of current paragraph in the table of parent paragraphs. This property is read-only. PageLayout Information about paragraph layout PageLayout.Alignment Integer constant Horizontal alignment used: haCenter: CenteredhaRight: Aligned to righthaLeft: Aligned to lefthaJustified: Justified. PageLayout.Border Border variable Identifier of border used for the paragraph. Remark: the rounded corners are not supported. PageLayout.BackgroundColor Integer Background color of paragraph. This color can correspond to:an RGB color (returned by RGB),a preset color. PageLayout.SpaceBottomBorder Real Spacing between the text and the bottom side of paragraph border (expressed in millimeters). This property is set to 0 by default. PageLayout.SpaceRightBorder Real Spacing between the text and the right side of paragraph border (expressed in millimeters). This property is set to 0 by default. PageLayout.SpaceLeftBorder Real Spacing between the text and the left side of paragraph border (expressed in millimeters). This property is set to 0 by default. PageLayout.SpaceTopBorder Real Spacing between the text and the top side of paragraph border (expressed in millimeters). This property is set to 0 by default. PageLayout.SpacingAfter Real Spacing after the paragraph (expressed in millimeters). This property is set to 0 by default. PageLayout.SpacingBefore Real Spacing before the 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 paragraph (expressed in millimeters). This property is set to 0 by default. PageLayout.LeftIndent Real Left indent of paragraph (expressed in millimeters). This property is set to 0 by default. PageLayout.IndentFirstLine Real Indent of first line in paragraph (expressed in millimeters). This property is set to 0 by default. PageLayout.CustomTabulation Array of docTabulation Custom tabulations of paragraph. PageLayout.BackgroundPattern Background variable Characteristics of 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. Numbering Numbering information. Numbering.Identifier Integer Identifier of numbering used for the paragraph. Used to identify or associate a numbering with the paragraph. For more details, see docNumberingLevel. Numbering.Level Integer Identifier of numbering level used for the paragraph. Used to identify or associate a numbering level with the paragraph. For more details, see docNumberingLevel. Parent docElement Element that contains the paragraph. StartPosition Integer Start position of paragraph in the document. EndPosition Integer End position of paragraph in the document. Section docSection Characteristics of the section to which the paragraph belongs. StyleID Character string Identifier of paragraph style. This identifier must exist among the styles linked to the document. Remark: changing the paragraph or fragment style automatically applies the linked paragraph style and character style if they exist. Table docTable variable Characteristics of the table corresponding to the paragraph. This property is used to find out whether the paragraph corresponds to a Text paragraph or to a Table paragraph. Example: let para <- f.Element[1].ParagraphIF para.Table = Null THEN // This is not an array RETURNEND
Minimum version required
• Version 22