PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Opens a Word Processing file (docx format) in Read/Write mode. The docx file is opened and locked until it is closed.
Note: To create a docx file without using an initial file, all you have to do is create a Document variable (in this case, DocOpen is useless).
Caution: This documentation presents the last features of the Word Processing control. Make sure that all the necessary modules are updated.
Example
// Using a Document variable
d is Document
d = DocOpen("C:\Users\test\Documents\file.docx")
 
IF ErrorOccurred() THEN
Error(ErrorInfo())
RETURN
END
// Using a Word Processing control
DocOpen(WP_MyWP, "C:\Users\test\Documents\file.docx")
 
IF ErrorOccurred() THEN
Error(ErrorInfo())
RETURN
END
Syntax

Associating a docx file with a Document variable Hide the details

<Result> = DocOpen(<Document source> [, <Password>])
<Result>: Document variable
Name of Document variable corresponding to the docx file. This variable can be used in all the DocXXX functions.
The ErrorOccurred variable is set to True if an error occurred and ErrorInfo returns the error details.
<Document source>: Type corresponding to the source
Corresponds to one of the following elements:
  • Full or relative path of docx XLS file to open (up to 260 characters).
  • Versions 24 and later
    Name of the Buffer variable with the docx document to display in the Word Processing control.
    New in version 24
    Name of the Buffer variable with the docx document to display in the Word Processing control.
    Name of the Buffer variable with the docx document to display in the Word Processing control.
  • Versions 24 and later
    Name of the memo item with the docx document to display in the Word Processing control. This parameter has the following format: <Data file> <Item>.
    New in version 24
    Name of the memo item with the docx document to display in the Word Processing control. This parameter has the following format: <Data file> <Item>.
    Name of the memo item with the docx document to display in the Word Processing control. This parameter has the following format: <Data file> <Item>.
<Password>: Optional character string (with quotes)
Versions 24 and later
Password to open the docx file to use (if the file is protected by a password).
New in version 24
Password to open the docx file to use (if the file is protected by a password).
Password to open the docx file to use (if the file is protected by a password).
Component : wd250mdl.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment