ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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
WP_MyDoc = DocOpen(fExeDir() + fSep() + "MyDoc.docx") 

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

FOR EACH MyCurrentElement OF TextFragment.Element
MyParagraph is docParagraph = MyCurrentElement.Paragraph
Trace(MyParagraph.StartPosition)
Trace(MyParagraph.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.
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.
ParagraphIndexIntegerIndex 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 variableIdentifier of border used for the paragraph.
Remark: the 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.LineSpacingRealLine spacing (expressed in millimeters).
Used if the LineSpacingType property is set to lineSpacingExact or lineSpacingMinimum.
By default, this property is set to 0.
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.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.
Remark: changing the paragraph or fragment style 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].Paragraph
IF para.Table = Null THEN 
// This is not an array
RETURN
END
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/03/2024

Send a report | Local help