The information in this article does not apply to building a Microsoft Outlook application to run from a service. Running Outlook in a service is not recommended and is not supported because some functionality in Outlook that can cause dialogs to appear cannot be programmatically controlled or trapped, thereby halting execution. In addition, you should select the Unattended Execution check box on the General tab of the Project Properties dialog box. Selecting this check box indicates that the project is intended to run without user interaction.
Unattended projects have no interface elements.
Any run time functions like messages that normally result in user interaction are written to an event log. Method 1 Paste the following code into a new BAS Module. Resolve 'Send the Message and Logoff. End Sub Method 2 Paste the following code into a new BAS Module. Build the executable.