nicksbell
asked on
How do I change the FROM address in Outlook 2007 using VBA
I have written some VBA code to send an email from Excel 2007 using Outlook.Application and Outlook.MailItem. My outlook is set up to access my exchange account but I have Send As permission to send from another account.
Can anyone tell me how to change the From field to the Send As address using VBA.
Thanks
Can anyone tell me how to change the From field to the Send As address using VBA.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you use the .SenderEmailAddress property of the mail object.
So:-
obj.SenderEmailAddress = "someone@example.com"
So:-
obj.SenderEmailAddress = "someone@example.com"
You're welcome.
ASKER
SenderEmailAddress is a read-only property. But its fine, as long as it goes from the right address I'm good.
ASKER
Thanks for your help.