General discussion
August 9, 2003 at 10:43 PM
tptbusines_98

Spell Check

by tptbusines_98 . Updated 23 years ago

Hello,
I am creating an application in MS-Access 97.
I have added an automated process of sending an email through Microsoft
Outlook?
How do I add “spell check” properties to the following code:

Private Sub Form_Load()

Dim objOutlookApp As Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objMail As Outlook.MailItem

‘Set the application objects
Set objOutlookApp = Outlook.Application
Set objNameSpace = objOutlookApp.GetNamespace(“MAPI”)

‘Login to Outlook
objNameSpace.Logon

‘Set the mail item
Set objMail = objOutlookApp.CreateItem(olMailItem)

‘Set properties for the mail item and send mail
With objMail
.BCC = “”
.Subject = “Message Sent from Visual Basic”
.Body = “This message was created by automating Outlook from
VB!”
.Send
End With

‘Logoff NameSpace
objNameSpace.Logoff

‘Release objects
Set objMail = Nothing
Set objNameSpace = Nothing
Set objOutlookApp = Nothing

End Sub

Charles L. Phillips

This discussion is locked

All Comments