Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Executable functions
  • Use in service mode
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Opens a document in its associated application. The application is opened first, then the specified document.
  • The application used to open the document is the one associated with the extension of the document in Windows (INI file or registry). This associated application may differ according to the configurations used.
  • To display any page in a browser, you can also use BrowserRunApp.
Reports and Queries
// Open the "Functions.doc" document in Word
// Print the document
ShellExecute("C:\WDNEWS\Version\Functions.doc", "print")
Reports and Queries
// Open a site in the default browser
Reports and Queries
// Start the default messaging
// Start the messaging with parameters
// Parameters recognized by Outlook
ShellExecute("" + ...
"?subject=Subject: LST &body=Text: the summary of the LST")
Reports and Queries
// Open the "Invoice.doc" document from its shortcut
ShellExecute("""C:\Documents and Settings\Julia\Desktop\Shortcut to Invoice.doc.lnk""")
<Result> = ShellExecute(<File name> [, <Verb>])
<Result>: Boolean
  • if the document exists and if the associated application has been launched.
  • False otherwise.
<File name>: Character string
Name and full (or relative) path of the document to open. A UNC path can be used.
If space characters are found in the name or path of the document to open, the quotes found around this parameter must be tripled.
<Verb>: Optional character string
Verb that must be used to start the document. The verbs are defined for each application, to indicate the actions that can be performed. The most common verbs are open or print. If this parameter is not specified, the verb used will be the default verb for the type of document.

Use in service mode

When ShellExecute is used in service mode, it runs the associated application but the interface of this application is not visible.
Business / UI classification: Neutral code
Component: wd290std.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 04/03/2023

Send a report | Local help