Visual Basic Code of the Week (COTW)
Issue #21
All content and source code is Copyright (c) 1998 by C&D Programming Corp. None of the source can be reprinted in any manner without express written permission of C&D Programming Corp.

Our Sponsor for this Issue

MCG, Inc is a small consulting company located in the New York area that specializes in Visual Basic programming. We have been in the programming field for over 10 years. We are currently looking for an experienced Visual Basic programmer to work in the New York/New Jersey/Long Island area. You should have at least 3 years of Visual Basic experience and have some experience working in a team environment. Requirements include Visual Basic 4.0/5.0, Microsoft Access and Oracle is a plus. The salary is very competitive and includes full health coverage and retirement plan.

If this type of position sounds interesting to you, please email us at

If you are interested in advertising in COTW (our rates are VERY reasonable), please email us at

Requirements for this Issue

The source code in this issue is designed for Visual Basic 4.0 and higher.

In this Issue

This issue introduces a class to send a simple email message directly from Visual Basic using the MAPISession and MAPIMessages controls that ship with Visual Basic.

MAPI Class

You will need to add the MAPI custom control to your project to use this class. In Visual Basic 5.0 you would perform the following steps:

This class requires that you drop a MAPISession and MAPIMessages control onto your form after you add the control to your project.