PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Properties specific to the description of Document variables
  • Functions that handle the Document variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The Document type is used to handle a "docx" document. The content of this document can be viewed and modified by several WLanguage functions and properties.
A Document variable can be initialized:
  • WINDEV with the content of a Word Processing control.
  • with a ".docx" file or an ".rtf" file.
  • with a buffer (containing a docx or rtf).
  • with a Binary Memo item of a data file.
  • with a character string. For example:
    MyDoc is Document = "a paragraph." + CR + "a second paragraph."
Note: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
// Load the document
MyDoc is Document = "c:\temp\doc.docx"
// Browse the paragraphs of the document
FOR EACH para OF MyDoc..Paragraph
FOR EACH MyElement OF para..Element
Trace(MyElement..Text)
END
END
Remarks

Properties specific to the description of Document variables

The following properties can be used to handle a Document variable:
Property nameType usedEffect
FilePathCharacter stringName and full path of docx file associated with the document.
This property is available in read-only. It is assigned when using DocOpen.

Notes:
  • When assigning a Document variable into another one, this property is not copied (except during the call to DocOpen).
  • If the document comes from a buffer, this property corresponds to an empty string ("").
Versions 24 and later
PageColor
New in version 24
PageColor
PageColor
Color variableBackground color of the page.
ReadOnlyBoolean
  • True if the document is read-only,
  • False otherwise.
This property is available in read-only.
ModifiedBoolean
  • True if the document was modified since its opening (by programming or by the user),
  • False otherwise.
This property is available in read-only.
Versions 24 and later
Password
New in version 24
Password
Password
Character stringPassword for the docx file. This password is used to encrypt the docx file. This password will be requested when opening the docx file.
EvenOddPageDifferentBoolean
  • True if the document must have different headers and footers for the even and odd pages,
  • False otherwise. In this case, the headers and footers are identical for the even and odd pages.
Note: This property is available from version 220071.
NumberingArray of docNumberingNumberings associated with the document. The document numberings can be browsed via the FOR EACH statement.
Caution: This property is available from WINDEV version 220052s (update module of Word Processing control applicable to WINDEV Update 1).
ParagraphArray of docParagraphParagraphs included in the document body. The document paragraphs can be browsed via the FOR EACH statement.
PropertydocProperty variableProperties of document.
Caution: This property is available from WINDEV version 220059U (update module of Word Processing control dated 05/17/2017).
SectiondocSection variableSection information (information global to the document).
Versions 23 and later
Bookmark[Bookmark Name]
New in version 23
Bookmark[Bookmark Name]
Bookmark[Bookmark Name]
Associative array of DocFragment variablesFragment associated with the bookmark.
StyleArray of docStyle variablesInformation about the styles linked to the document (information global to the document).

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>

Functions that handle the Document variables

Document variables can be handled using the following WLanguage functions:
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment