Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access/ Office 2016, 2013, 2010, and 2007 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2016, 2013, 2010 and 2007, and Visual Basic 6.0!

Separate version for Access/Office 2003, 2002, and 2000.

Separate version for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

Microsoft Access, Office/VBA, VB6 Modules royalty-free source code libraryMicrosoft Access Modules royalty-free source code libraryMicrosoft Access VBA and VB6 Module Library Free trial of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA

Class: OutlookMail in Category Microsoft Outlook : Automation from Total Visual SourceBook

Working with Microsoft Outlook Mail Items through Automation using VBA and VB6.

Procedure List

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the COutlookMail class
AppNameSpace Property Get a handle to the current instance of the Outlook NameSpace
AppOutlook Property Get a handle to the current instance of Outlook
Delimiter Property Set the value of the Delimiter Property
Class_Initialize Initialize Executed when the class initializes. Sets default poperty values.
SendMail Method Sends a message using the following properties : Recipients, CC, BCC, SubjectBody, Delimiter
StartOutlook Method Starts an instance of Outlook
Class_Terminate Terminate Clean up class variables opened for Outlook
CloseOutlook Method Close an instance of Outlook; don't call this if you want to leave Outlook open

Example Code for Using Class: OutlookMail

' Example of the COutlookMail class
'
' To use this example:
' 1.  Create a new form
' 2.  Create a command button named cmdSendMail
' 3.  Create a new check box named chkDisplay
' 4.  Create text boxes named
'       txtRecipients
'       txtCC
'       txtBCC
'       txtSubject
'       txtbody
'       txtAttachments

Private Sub cmdSendMail_Click()
  Dim clsCOutlookMail As COutlookMail
  Dim fOK As Boolean

  ' Initialize Address Book class and connect to Outlook
  Set clsCOutlookMail = New COutlookMail
  clsCOutlookMail.StartOutlook

  fOK = clsCOutlookMail.SendMail(Nz(Me.txtRecipients), Nz(Me.txtCC), Nz(Me.txtBCC), Nz(Me.txtSubject), Nz(Me.txtBody), "", Nz(Me.txtAttachments), olImportanceNormal, Me.chkDisplay)

  Set clsCOutlookMail = Nothing

  MsgBox "Email sent successfully: " & fOK

End Sub

Microsoft Access Module LibraryOverview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources