Hi Guys
I want to add From in the following code so basically when we send an email using vba code then it gets sent from my office outlook email address but I infact want to send it from the "Department mailbox" e.g DirectQuery@axa.com. I am using Access 2010 but it gives me "Object doesn't support this property or method " at From statement.
Any help will be much appreciated.
Thanks
I want to add From in the following code so basically when we send an email using vba code then it gets sent from my office outlook email address but I infact want to send it from the "Department mailbox" e.g DirectQuery@axa.com. I am using Access 2010 but it gives me "Object doesn't support this property or method " at From statement.
Code:
With MailOutLook
.From = "[EMAIL="DirectQuery@axa.com"][COLOR=#000080]DirectQuery@axa.com[/COLOR][/EMAIL]"
.To = [EMAIL="Smith@yahoo.com""]Smith@yahoo.com"[/EMAIL]
'.To = sMailList
.Subject = strSubject
.Body = "Please provide an update on your outstanding actions:" & vbCrLf & vbCrLf & strBody
.sEnd
End With
Any help will be much appreciated.
Thanks