ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Word Processing functions / Types of variables
  • Properties specific to docParagraph variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The docParagraph type is used to handle the characteristics of a paragraph in a DOCX document. You can define and change the characteristics of this paragraph 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
TT_MonDoc = DocOpen(fExeDir() + fSep() + "MonDoc.docx") 
FragmentTexte is docFragment(TT_MonDoc, 1, Length(DocToText(TT_MonDoc)))
FOR EACH MonElementCourant OF FragmentTexte.Element
	MonParagraphe is docParagraph = MonElementCourant.Paragraphe
	Trace(MonParagraphe.StartPosition)
	Trace(MonParagraphe.EndPosition)
END
Remarks

Properties specific to docParagraph variables

The following properties can be used to handle docParagraph variables:
Property nameType usedEffect
CelldocCell variableUsed to access the cell of parent table.
StartSectionInteger constantSection 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.
New in version 2024
RightToLeft
Boolean
  • True if the actual writing direction goes from right to left,
  • False if the actual writing direction goes from left to right.
ElementArray of docElementElements included in the paragraph. The elements found in the paragraph can be browsed via the FOR EACH statement.
EndSectionInteger constantSection 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.
ParagraphIndexentierIndex of current paragraph in the table of parent paragraphs.
This property is read-only.
PageLayoutInformation about paragraph layout
PageLayout.AlignmentInteger constantHorizontal alignment used:
  • haCenter: Centered
  • haRight: Aligned right
  • haLeft: Aligned to left
  • haJustified: Justified.
PageLayout.BorderBorder variableCharacteristics of the border used for the paragraph.
Remark: rounded corners are not supported.
PageLayout.BackgroundColorentierBackground color of paragraph. This color can correspond to:
PageLayout.SpaceBottomBorderRealSpacing between the text and the bottom side of paragraph border (expressed in millimeters).
This property is set to 0 by default.
PageLayout.SpaceRightBorderRealSpacing between the text and the right side of paragraph border (expressed in millimeters).
This property is set to 0 by default.
PageLayout.SpaceLeftBorderRealSpacing between the text and the left side of paragraph border (expressed in millimeters).
This property is set to 0 by default.
PageLayout.SpaceTopBorderRealSpacing between the text and the top side of paragraph border (expressed in millimeters).
This property is set to 0 by default.
PageLayout.SpacingAfterRealSpacing after the paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.SpacingBeforeRealSpacing before the paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.LineSpacingRealLine spacing (expressed in millimeters).
Used if the LineSpacingType property is set to lineSpacingExact or lineSpacingMinimum.
By default, this property is set to 0.
New in version 2024
Layout.IndentForText
RealLeft indent of paragraph (expressed in millimeters).
This property is set to 0 by default.
New in version 2024
PagePage.ShrinkAfterText
RealRight indent of paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.RightIndentRealRight indent of paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.LeftIndentRealLeft indent of paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.IndentFirstLineRealIndent of first line in paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.CustomTabulationArray of docTabulationCustom tabulations of paragraph.
PageLayout.BackgroundPatternBackground variableCharacteristics of paragraph background.
PageLayout.LineSpacingTypeInteger constantType of line spacing used:
  • lineSpacingExact: The line spacing corresponds to the value of the LineSpacing property.
  • lineSpacingMinimum: The line spacing is at least the value of the LineSpacing property. If the default line spacing of the font used on the previous line is greater than the LineSpacing property, the default line spacing of the font is used.
  • lineSpacingMultiple (default value): The line spacing is obtained by multiplying the LineSpacing property by the default line spacing of the font of the previous line and dividing the result by 240.
Remark: This constant corresponds to InterlineType in previous versions.
NumberingNumbering information.
Numbering.IdentifierentierIdentifier of numbering used for the paragraph. Used to identify or associate a numbering with the paragraph. For more details, see docNumberingLevel.
Numbering.LevelentierIdentifier of numbering level used for the paragraph. Used to identify or associate a numbering level with the paragraph. For more details, see docNumberingLevel.
ParentdocElementElement that contains the paragraph.
StartPositionentierStart position of paragraph in the document.
EndPositionentierEnd position of paragraph in the document.
SectiondocSectionCharacteristics of the section to which the paragraph belongs.
StyleIDCharacter stringIdentifier 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.
ArraydocTable variableCharacteristics 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].Paragraphe
IF para.Tableau = Null THEN 
	// Ce n'est pas un tableau
	RETURN
END
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/24/2024

Send a report | Local help