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 document in a new window by using the WINDEV editor adapted to the document (word processor, spreadsheet, PDF reader or image editor).
Example
sDocument is a string
sDocument = fSelect("C:\Directories", "File.docx", ...
      "Select a file", ...
      "Word file (*.docx)" + TAB + ".docx" + CR + "Spreadsheet (*.xlsx)" + TAB + ".xlsx")
IF OpenDocument(sDocument) = odFailure THEN
Error("Unable to open the document.")
END
 
Syntax
<Result> = OpenDocument(<Document> [, <Title> [, <Options> [, <Password>]]])
<Result>: Integer constant
Status report of document opening :
odFailureThe document was not opened.
odOpenModifiedThe document was opened and modified.
odOpenNotModifiedThe document was opened but it was not modified.
<Document>: Character string (with quotes)
Document to open. Corresponds to:
  • the full or relative path of document file to open.
  • a buffer or a HFSQL memo containing the document to open. If the function returns the odOpenModified constant, the <Document> parameter will contain the buffer or HFSQL memo modified and saved in the document edit.
  • a Document, xlsDocument or Image variable. If the function returns the odOpenModified constant, the <Document> parameter will contain the variable modified and saved during the document edit.
<Title>: Optional character string (with quotes)
Title of window opened to display the document. By default, this parameter corresponds to the title of current window.
<Options>: Optional Integer constant
Options for document opening:
odOptionNone
(default value)
Document opened in read/write in a non-maximized window.
odOptionMaxWindowDocument opened in read/write in a maximized window.
odOptionReadOnlyDocument opened in read-only. This constant can be combined with the odOptionNone and odOptionMaxWindow constants.
If an image is opened with the odOptionReadOnly constant, all modification options will be accessible in the image editor and the user will be able to "Save as".
For all other types of documents, all modification options proposed by the document editor are not accessible.
<Password>: Optional character string
Password to use if the file is protected, empty string ("") if the file is not password protected.
Business / GUI classification : GUI Code
Component : wd250obj.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
video OpenDocument
https://youtu.be/CaZQarX_Tc4
https://windevdesenvolvimento.blogspot.com/2019/09/dicas-2286-windev-webdev-mobile.html
// BTN_ABRE_DOCUMENTO
OpenDocument(TABLE_ARQUIVOS.COL_ARQUIVO)
amarildo
12 Sep. 2019
Video OpenDocument
https://youtu.be/QYZUxcgEZEE
https://windevdesenvolvimento.blogspot.com/2019/08/dicas-2244-windev-webdev-mobile-24.html
// BTN ABRE IMAGEN
OpenDocument(EDT_PROCURA_WORD_EXCEL_PDF_IMAGEN)
amarildo
11 Aug. 2019
video OpenDocument
https://youtu.be/_oaBDjVkWU4
https://windevdesenvolvimento.blogspot.com/2019/08/dicas-2242-windev-webdev-mobile.html
// BTN ABRE IMAGEN
OpenDocument(EDT_PROCURA_IMAGEN)
amarildo
10 Aug. 2019