PDA

View Full Version : Solved: Outlook 2010 VBA Spell Check Code



kenburenga
12-13-2010, 05:22 PM
I have the following macro that assigns a category, and saves the e-mail to my "Follow-Up" folder when it is sent. I would like to force a spell check before the e-mail is sent. Can someone tell me the VBA code to add to the macro to do this. Thanks.

Sub RailroadCategory()
Set objMail = Application.ActiveInspector.CurrentItem
Dim myNamespace As NameSpace
Dim objFolder As MAPIFolder
objMail.Categories = "Railroad"
objMail.Save
Set myNamespace = Application.GetNamespace("MAPI")
Set objFolder = myNamespace.GetDefaultFolder(olFolderInbox).Parent.Folders("FollowUp")
Set objMail.SaveSentMessageFolder = objFolder
Set myNamespace = Nothing
Set objFolder = Nothing
objMail.Send
End Sub