AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones varias de WINDEV
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Opens a document in a new modeless window using the appropriate WINDEV editor (word processor, spreadsheet, PDF reader or image editor).
The result can be retrieved via a WLanguage procedure ("callback") when the document editing window is closed.
Remark: Advantage over the asynchronous syntax of OpenDocument: when OpenDocumentAsynchronous is used, the document is always opened in asynchronous (non-blocking) mode, whether the WLanguage procedure is specified or not.
Example
INTERNAL PROCÉDURE OpenDocumentAsynchronous_Callback(sDoc, nStatusReport)
IF nStatusReport = odOpenModified THEN
Info(sDoc + " has been modified.")
END
END
 
IF NOT OpenDocumentAsynchronous(sDocument, "My document", ...
odOptionNone, "", OpenDocumentAsynchronous_Callback) THEN
Error("Unable to open the 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, the <Document> parameter will contain the buffer or HFSQL memo modified and saved in the document edit.
  • a variable of type Image, xlsDocument or Document. 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
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:
odOptionHidePaneIf 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.
odOptionMaxWindowDocument opened in read/write in a maximized window.
odOptionNone
(default value)
Document opened in read/write in a non-maximized window.
odOptionReadOnlyDocument opened in read-only.
<Password>: Optional character string
  • Password to use if the file is protected,
  • Empty string ("") if the file is not password-protected.
<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.
Component: wd290obj.dll
Versión mínima requerida
  • Versión 27
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 20/01/2023

Señalar un error o enviar una sugerencia | Ayuda local