Automating Emails

bjackson

Registered User.
Local time
Today, 19:39
Joined
Jan 3, 2003
Messages
404
Is there any way to automate adding an attatchment to emails in access,similiar to to sendobject action.The attatcment is a .Txt file and i need to use Outlook Express not "OutLook".
Can anybody help
Regards
Bjackson
 
Dim objOutlook As New Outlook.Application
Dim objMail As Outlook.MailItem
Dim strsql As String
Dim strMail As String

Set objMail = objOutlook.CreateItem(olMailItem)
objMail.To = Forms.Yourfield

objMail.Cc = Forms.Yourfield & "@your address.com"
objMail.Attachment = "Your file path"
objMail.Subject = "Your Subject"
strMail = "Your Message"
objMail.Body = strMail
objMail.Send

Set objMail = Nothing
Set objOutlook = Nothing

Not Tested - I've never used express before I'm not sure how to call it.
 
Thank you for your reply
Unfortunately this wont work in Outlook Express,it keeps wanting to use OutLook to send the mail

Ill keep trying
Regards
Bjackson
 

Users who are viewing this thread

Back
Top Bottom