Help. I need to automatically send emails

K

Kokomo Juggler

I have an excel application that generates a text file. I would like to
create VBA in outlook to read the text file and send it to addresses that
are in the file. I would send the emails via excel, but not all recipients
have Excel.

This should be really simple. I just want to know how to create an email and
send it. I think I can to the rest.

Thanks!
 
S

Sue Mosher [MVP-Outlook]

The Outlook VBA code to create and send a message would be:

Set objItem = Application.CreateItem(olMailItem)
objItem.To = "[email protected]"
objItem.Subject = "Subject of this message"
objItem.Body = "some body text"
objItem.Send

If the message involves tables, consider using HTMLBody instead of Body and supplying fully tagged HTML content, including tables.
 
Top