VBA without using "sendmail" and without sending file attachment


Posted by craigd on October 22, 2001 5:02 PM

Advice would be appreciated on the following:
I need to send an automated email, but without using the sendmail command. I don't want to send the Excel file as an attachment, just an email with a message in the body.
I have established that I might be able to use the Outlook application model, but I can't seem to create a reference to the Outlook Library in my code.
If I could, I could use something like..

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)

With objMail
.To = "joe.bloggs@something.com"
.Subject = "Automated Mail Response"
.Body = "This is an automated message from Excel. "
.Display
End With
Set objMail = Nothing
Set objOL = Nothing
End Sub

Please provide some more detailed advice as to how the above code should operate, or provide an alternative solution.
Much appreciated



Posted by R U A Guru? on October 23, 2001 5:37 PM

If you are a Guru - this is the one for you