Nope, SenderEmailAddress is a read-only property.
Main Topics
Browse All TopicsI am trying to write some VBA code in Outlook 2003 to send an email from each of the email accounts that I have setup, one Exchange and one POP3, but I can not find how to set the account the mail is sent from.
Thanks
Kev
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi, kdaviso.
You can use something like this:
Sub CreateNewMessage()
Dim olMessage As MailItem, _
olkInspector As Outlook.Inspector, _
olkSendThroughBtn As CommandBarPopup, _
olkSendAccount As CommandBarButton
Set olMessage = Application.CreateItem(olM
olMessage.BodyFormat = olFormatHTML
olMessage.Display
Set olkSendThroughBtn = Application.ActiveInspecto
'Change 2 on the next line to the correct number of the account you want to send through
Set olkSendAccount = olkSendThroughBtn.Controls
olkSendAccount.Execute
End Sub
That does indeed work, but only if you are not using Word as your email editor, which I am. I've noticed the Account control is buried in a commandbar called Envelope, but its controls do not seem to be accessible. Is there a way to get this to work with Word?
Also, I notice that you have to display the message before you can access the controls collection, as per your idea. The process I am trying to write could be forwading many emails, so to have the items flashing on the screening isn't that "elegant".
I understand. Personally, I avoid using Word as my email editor like the plague. I know it offers a number of advanced features, but it also causes far more problems than it's worth (in my opinion). That aside, even if the code could be modified to work with Word I don't know of any way to avoid displaying the messages on screen to make this work. Microsoft simply didn't expose the properties/methods necessary to do this programmatically behind the scenes.
It is possible to change the editor via code. The editor is controlled by a registry key. That key is HKCU\Software\Microsoft\Of
Dim objShell
Set objShell = CreateObject("Wscript.Shel
objShell.RegWrite "HKCU\Software\Microsoft\O
Set objShell = Nothing
I haven't tested to see if this will switch the editor while Outlook is open. Sometimes a registry change isn't picked up until the next time the software is loaded. If this does work, then you'd want to reverse the process at the end of your routine.
Business Accounts
Answer for Membership
by: IceBergPosted on 2007-06-19 at 13:44:41ID: 19319712
Can't you just use the SenderEmailAddress property?
ailItem) = "bob@123.com"
e.g.
Dim objMail As MailItem
Set objMail = Application.CreateItem(olM
objMail.SenderEmailAddress