|
|
|
|
|
OpenDocumentAsynchronous (Function) In french: OuvreDocumentAsynchrone Opens a document in a new (non-modal) window using the WINDEV editor adapted to the document: - word processing,
- spreadsheet,
- PDF reader,
- image editor,
The result can be retrieved via a WLanguage procedure ("callback") when the document editing window is closed. Note: Advantage over the asynchronous syntax of function OpenDocument: when using function OpenDocumentAsynchronous FUNCTIONfunction, opening always takes place in asynchronous (non-blocking) mode, whether or not the WLanguage procedure is specified. INTERNAL PROCEDURE OuvreDocumentAsynchrone_Callback(sDoc, nCompteRendu)
IF nCompteRendu = odOpenModified THEN
Info(sDoc + " a été modifié.")
END
END
IF NOT OpenDocumentAsynchronous(sDocument, "Mon document", ...
odOptionNone, "", OuvreDocumentAsynchrone_Callback) THEN
Error("Impossible d'ouvrir le document.")
END
Syntax
<Result> = OpenDocumentAsynchronous(<Document> [, <Title> [, <Options> [, <Password> [, <WLanguage procedure>]]]])
<Result>: Boolean - True if the type of document to be opened has been detected,
- False otherwise.
<Document>: Character string Document to open. Corresponds to:- the full or relative path of document file to open.
- a buffer or an HFSQL memo containing the document to open. If the function returns the odOpenModified constant, <Document> will contain the buffer or HFSQL memo item modified and saved when the document was edited.
- a variable of type: If the function returns the odOpenModified constant, <Document> will contain the variable modified and saved when the document was edited.
<Title>: Optional character string Title of window opened to display the document. By default, this parameter corresponds to the title of current window. <Options>: Optional Integer constant (or combination of constants) Options for document opening:
| | odOptionHidePane | If the document is an image, it is displayed in the image editor and the right pane (that displays the color characteristics) is not displayed by default. | odOptionMaxWindow | Document opened in read/write in a maximized window. | odOptionNone (default value) | Document opened in read/write in a non-maximized window. | odOptionReadOnly | Document opened in read-only. |
<Password>: Optional string or Secret string - Password to use if the file is protected,
- Empty string ("") if the file is not password-protected.
New in version 2025Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string". To learn more about secret strings and how to use the vault, see Secret string vault.
<WLanguage procedure>: Name of the procedure or lambda procedure Name of the WLanguage procedure ("callback") called after the document editing window is closed. For more details on this procedure, see Parameters of the procedure used by OpenDocumentAsynchronous. This WLanguage procedure can correspond to: - a name of a global procedure,
- a name of an internal procedure,
- a lambda procedure.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|