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.
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:
  • 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 variableCharacteristics of the border used for the paragraph.
Remark: 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:
  • 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 default line spacing of the previous line by the LineSpacing property.
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: 07/17/2024

Send a report | Local help