Private Function EmailTest()
'Reference must be set to the Microsoft Outlook Library
Dim oGift As CGift
Set oGift = New CGift
Dim oOutlook As Outlook.Application
Set oOutlook = New Outlook.Application
Dim oMailItem As Outlook.MailItem
Set oMailItem = oOutlook.CreateItem(olMailItem)
.To = "email@example.com"
.Subject = "Email Gift Test using RE VBA"
.Body = "Gift Info: " & oGift.Fields(GIFT_fld_UserGiftId)
'Comment out or delete the above line ".Display" if you want the email to be sent without user intervention.
Set oMailItem = Nothing
Set oOutlook = Nothing
Set oGift = Nothing
Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Blackbaud Customer Support may help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality.