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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
Note: 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
Properties

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:
  • ssAucunSaut: No section break before the paragraph.
  • ssSectionBreak: A section break of the page break type precedes the paragraph..
  • ssContinuousSectionJump: A continuous section break precedes the paragraph..
  • ssOddPageSectionBreak: An odd page break section break precedes the paragraph..
  • ssEvenPageSectionBreak: An even page break precedes 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.
RightToLeftBoolean
  • 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:
  • ssAucunSaut: No section jump after the paragraph.
  • ssSectionBreak: A page break section break follows the paragraph..
  • ssContinuousSectionBreak: A continuous section break follows the paragraph..
  • ssOddPageSectionBreak: An odd page break section break follows the paragraph..
  • ssEvenPageSectionBreak: An even page break section break follows 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.
ParagraphIndexIntegerIndex of current paragraph in the table of parent paragraphs.
This property is read-only.
PageLayoutInformation about paragraph layout
PageLayout.AlignmentInteger constantHorizontal alignment used:
  • chCentre: Centred
  • chRight: Right-aligned
  • chLeft: Left-aligned
  • chJustified: Justified.
PageLayout.BorderBorder variableCharacteristics of the border used for the paragraph.
Note: rounded corners are not supported..
PageLayout.BackgroundColorIntegerBackground 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.LineSpacingRealLineSpacing .
If the LineSpacingType property is set to lineSpacingExact or lineSpacingMinimum, the value is expressed in milimeters.
If the LineSpacingType property is set to lineSpacingMultiple, the value will be a factor.
By default, this property is set to 0.
PageLayout.IndentBeforeTextRealLeft indent of paragraph (expressed in millimeters).
This property is set to 0 by default.
PageLayout.IndentAfterTextRealRight 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:
  • interligneExact: Line spacing corresponds to the value of property Interligne.
  • interligneMinimum: Line spacing corresponds at least to the value of property Interligne. 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.
  • line spacingMultiple (default): LineSpacing is obtained by multiplying the default line spacing of the previous line's font by the property Interline.
Note: in previous versions, this property was called InterligneType.
NumberingNumbering information.
Numbering.IdentifierIntegerIdentifier of numbering used for the paragraph. Used to identify or associate a numbering with the paragraph. For more details, see docNumberingLevel.
Numbering.LevelIntegerIdentifier 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.
StartPositionIntegerStart position of paragraph in the document.
EndPositionIntegerEnd 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.
Note: changing the style of a paragraph or fragment automatically applies the linked paragraph style and character style if they exist.
TabledocTable 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: 09/20/2024

Send a report | Local help