PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Properties specific to the description of docElement variables
  • Functions that manipulate docElement 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 docElement type is used to handle each element found in a docParagraph variable.
The characteristics of this element can be defined and changed using different WLanguage functions and properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Opens a docx file in the Word Processing control
WP_MyDoc = DocOpen(fExeDir() + fSep() + "MyDoc.docx")
 
// Fragment positioned at the end of document
fEnd is docFragment(WP_MyDoc, -1)
// Selects the document
TextFragment is docFragment(WP_MyDoc, 1, fEnd.EndPosition)
 
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 docElement variables

The following properties can be used to handle a docElement variable:
Property nameType usedEffect
CelldocCell variableCell characteristics (only if the element corresponds to a table cell).
EndPositionIntegerEnd position of element in the document.
This property is read-only.
FormuladocElementFormula variableCharacteristics of formula: formula, formula formatting, formula result (for a formula element only).
ImagedocElementImage variableImage characteristics (can be used for an Image element only).
LinkdocElementLink variableLink characteristics (only if the element corresponds to a link).
These characteristics are available in read-only.
ParagraphdocParagraph variableParagraph that contains the element.
ParentdocElement variableElement that contains the element.
This property is read-only.
StartPositionIntegerStart position of element in the document.
This property is read-only.
TableOfContentsdocTableOfContents variableCharacteristics of the table of contents of the document.
TextdocElementText variableText characteristics (can be used for a Text element only).
TextAreadocElementTextArea variableCharacteristics of text area (can be used for a Text Area element only).
TypeIntegerType of element corresponding to one of the following constants:
  • typeDocElementCell: Table Cell element.
  • typeDocElementDocument: Document element.
  • typeDocElementHeader: Header element.
  • typeDocElementFormula: Formula element. 
  • typeDocElementImage: Image element.
  • typeDocElementUnknown: Unrecognized element.
  • typeDocElementLink: Link element.
  • typeDocElementParagraph: Paragraph element with no text (empty text).
  • typeDocElementFooter: Footer element.
  • typeDocElementTableOfContents: Table of Contents element.
  • typeDocElementText: Text element.
  • typeDocElementTextArea: Text Area element.
This property is read-only.

Functions that manipulate docElement variables

DocAddAdds:
  • at the end of a Word Processing document: an element, a document, a paragraph, a text, an image or a fragment.
  • at the end of a fragment: an element, a text or an image.
DocChangeZOrderChanges the Z-order of an Image or Text Area element in a DocX document.
DocInsertInserts an object into a Word Processing document or replaces the content of the current fragment. The objects that can be used are:
  • an element,
  • a document,
  • a paragraph,
  • a text,
  • an image,
  • a fragment.
DocDeleteDeletes an element from a document. This element is deleted from its associated document.
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment