Sending email from outlook

RichardMGreen

Well-known Member
Joined
Feb 20, 2006
Messages
2,177
Hi all

I need to automate the sending of emails from an Outlook address box but I need to change the sender so any replies go to a central point.
I googled the problem but all the code I've found doesn't show me how to change the sender on the emails.
I've also runn into a problem where I get a warning that it's a possible virus and I need to click yes to send the mail, so I need to get around that as well.

Any help gratefully accepted.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I don't think that you can change the address that the e-mail is sent from in versions of Outlook before 2007.
 
Upvote 0
OK, thanks for that. Looks like it's a change of plan then.......unless I can alter it so it says "Sent By XX on behalf of YY" or something along those lines.
 
Upvote 0
yes you can... adapted from my own production code, works fine in Outlook 2003:

Code:
Dim myOlApp As Outlook.Application
Dim MyItem As Outlook.MailItem
Set MyItem = myOlApp.CreateItem(olMailItem)
'... other code here
MyItem.SentOnBehalfOfName =[COLOR=black]"[/COLOR][COLOR=black]some.address@mail.com[/COLOR][COLOR=black]"[/COLOR]
 
Upvote 0
yes you can... adapted from my own production code, works fine in Outlook 2003:

Code:
Dim myOlApp As Outlook.Application
Dim MyItem As Outlook.MailItem
Set MyItem = myOlApp.CreateItem(olMailItem)
'... other code here
MyItem.SentOnBehalfOfName =[COLOR=black]"[/COLOR][COLOR=black]some.address@mail.com[/COLOR][COLOR=black]"[/COLOR]


Ah, one lives and learns :)
 
Upvote 0
Thanks for that.
Now just the warning to get around (looks like a third-party install if IT will agree to it).
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top