PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
Saves a document in "docx" format. The saved document remains opened. To close it, you must use DocClose.
Caution: This documentation presents the last features of the Word Processing control. Make sure that all the necessary modules are updated.
Example
// Choose the directory and the backup name
sFileName is string = fSelect(CompleteDir(fExeDir()),"presentation.docx", ...
"Selecting DocX files","Docx file (*.docx)" + TAB + "*.docx" , "*.docx", fselCreate)

// Save the file
DocSave(WP_NoName1, sFileName)

IF ErrorOccurred THEN
Error(StringBuild("The %1 file was not saved.", sFileName), ErrorInfo())
RETURN
END
Syntax
<Result> = DocSave(<Document> [, <File Path>])
<Result>: Boolean
  • True if the backup was performed,
  • False otherwise.
<Document>: Character string (with or without quotes)
Document to save. This document can correspond to:
  • a Document variable.
  • WINDEV a Word Processing control.
<File Path>: Optional character string (with quotes)
Full path and name of "docx" file.

If this parameter is specified, the file is saved at the specified location (the existing file is overwritten if necessary).
  • If the backup is successful, the ..FilePath property of the Document variable used contains <File Path>. The "docx" file remains opened.
  • IF the "docx" document is saved with a path that differs from the initial one (corresponds to "Save as"), the source file is closed, the document is saved in the new file and the new "docx" file remains opened.
If this parameter is not specified, the path taken into account is the path specified in the ..FilePath property of the Document variable used.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230mdl.dll
Linux wd230mdl.so
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment