How to Run Programs and Execute Documents, MailTo: Links and URLs

Posted December 15th @ 12:00 pm by m3Rlin

The easiest way to open a document, program or URL is to use the Windows API ShellExecute() function. Thanks to this function you can execute almost everything in Windows.

uses ShellAPI;

(* sObject - (string) the program, document, URL, … that you want to
** open. This can be:
**
** a document - ‘C:\My Documents\Tips.txt’
** a program - ‘notepad.exe’ [...]