Hello,
I'm trying to send an email from Access to Outlook and need to have it specify that it is coming from a certain email account, even if it is not. We are using MS Exchange 2003 if that make a difference and here's my code:
If Me.Sent = False Then
Dim objOutlook As Object
Dim objMail As Outlook.MailItem
Dim objEmail As String
Dim objSub As String
Dim objMsg As String
Set objOutlook = CreateObject("Outlook.application")
Set objMail = Outlook.CreateItem(olMailItem)
objEmail = Me.Email
objSub = "We've Missed You!"
objMsg = Me.Message
objMail.From = "My Company's Name"
objMail.To = Me.Email
objMail.subject = objSub
objMail.Body = objMsg
objMail.Send
Set objOutlook = Nothing
End If
I'm getting the error on the "objmail.from" line - Runtime Error '638': Object doesn't support this property or method.
Any help would be greatly appreciated.
Joshua