PDA

View Full Version : send email



ProteanBeing
02-05-2008, 01:17 PM
I would like an email to be sent to me when the user enters in a new record. We use Microsoft Outlook. How can I send an email? (Just need text, no file attached).

PhilJette
02-05-2008, 05:30 PM
Dim OutlookApp As Object
Dim Mail as Object

Set OutlookApp = CreateObject("Outlook.Application")
Set Mail = OutlookApp.CreateItem(0)
With Mail
.To = recipient@something.com
.Subject = "Your subject"
.Body = "insert text here"
.Display
End With


This will display the message and the user will need to click send. You can use .Send in the With statement, but unfortunately it displays an alert which can't be suppressed by "DisplayAlerts = False".
there is a way around, but I think it's fairly complex...

ProteanBeing
02-06-2008, 10:16 AM
if there is a way around it I would like to know. Please someone post if you know. Thanks!

ProteanBeing
02-19-2008, 02:02 PM
What about attachments?