Send e-mail using Outlook

Category:
Office/VBA
Type:
Snippets
Difficulty:
Beginning
Author:
Stanley Campbell

Version Compatibility:

More information:
This routine will allow you to send e-mail in Visual Basic by creating an instance of Outlook. Outlook must be installed on the machine it is running on for the code to work. In addition, Outlook should be configured to send mail automatically upon connection (the default); otherwise, the message will remain in the Outbox until manually sent.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: