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
Converts a Word Processing document into an HTML file.
Note: This function is available for the applications run in 32-bit mode only.
Example
d is Document = "text.docx"
IF DocToHTML(d, "text.htm") THEN
Info("Document converted to HTML format")
END
// Exports the content of a Word Processing control to HTML
// Click code of "HTML export" button
DocToHTML(WP_MyDoc, fExeDir() + [fSep] + "wp.htm")
Syntax
<Result> = DocToHTML(<Document to Convert> [, <Path>])
<Result>: Boolean or Buffer
  • If <Path> is specified:
    • True if the file was generated,
    • False otherwise. To find out the error details, use ErrorInfo.
  • If <Path> is not specified, <Result> corresponds to a buffer containing the HTML code.
<Document to Convert>: Document variable or character string (with or without quotes)
Document to use. This document corresponds to:
  • the name of a Word Processing control.
  • a Document variable.
<Path>: Optional character string
Path of HTML file to generate. If the path is not specified, the HTML code is returned in buffer format.
Remarks
If the document contains images, these ones are saved in a sub-directory named like the generated HTML file.
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