View Full Version : Sending email from within Excel (.From) issue

05-04-2010, 03:44 AM
hey all. i have a chunk of code that works great, but am tying to modify one last bit.

I run a macro daily that process a report, then sends it out to a bunch of different folks. the problem is they always email me back directly with questions instead of my group :banghead: .

Set objol = New Outlook.Application
Set objmail = objol.CreateItem(olMailItem)

With objmail
.From = "tvm2@here.com" '(i know this dosen't work...just using for illiustration becasuse i am not sure how else to make this work!")
.To = "william@here.com"

When i normally send out an email this is the header you would see. in other words, SAT - VM Distribution = tvm2@here.com and william = william@here.com

William; on behalf of; SAT - VM Distribution

i want to send it from tvm2 on my behalf. any ideas?

05-09-2010, 07:09 PM
I'm pretty much a newbie, but I have the exact same scenario at work. I don't know for sure, but I presume that there is no way to send the report from someone else's email, the way you want to do it(due to security constraints for one). The way I worked around it would be to automatically by macro send the email to tvm2 and then have that person send it out by hitting 'Forward' and sending it the appropriate distribution list. This is a matter of a few seconds for the intermediary, so shouldn't be too onerous to ask for.

That way when the final recipients hit 'Reply' they will be replying(and asking their questions) of tvm, not you.

It is probably workable to have a macro set up on tvm's system to automatically forward emails from you with a particular subject line to a given distribution list, but I have never tried to do this. In my case, manual forwarding works perfectly fine.

Cheers, :)

05-10-2010, 05:58 AM

The From line sometimes can be used to send mail via a group ID or a more authoritative ID. I use this method, however, there is only a very rare instance I need it and hence I do it manually. I've not found a resource (as yet) to send the mail using the "From" field.


05-11-2010, 03:25 AM
shawnhet -- your idea would work well, but my report often creates anywhere from a few emails to a few hundred.

as i think i stated in my prior post, my macro runs fine....just wish i knew how to to address the "from" field. i dont guess it really matters as the email i send out says to address all comments, concerns, questions, etc to the tvm mailbox but no one ever does. :dunno

05-11-2010, 03:31 AM
What if you set up your return mail address to the TVM address. That setting will have to be done in OE/MS Outlook. This would change the setting for any other mail that goes out from your mail ID. The return address would be TVM. If that's what you are looking for.