excel VBA sending mail
Posted on 2016-10-13
Can anyone tell me why this dose not work. The code below just keeps coming up with errors . Also I need to be able to reference cells to fill in the address, subject matter etc. So when the macro is run it should open outlook look at the current row take the email address and other contents for the title and body of the email then give me the option to press send.
Dim outlookOBJ As Outlook.Application
Dim mitem As Outlook.mailitem
Set outlookOBJ = New Outlook.Application
Set mitem = outlookOBJ.CreateItem(olMailItem)
.To = "scoombes@****.com"
.Subjet = "Test"
.Body = "This is some text in an email"