Consulting

Results 1 to 5 of 5

Thread: Sending email from within Excel (.From) issue

  1. #1

    Sending email from within Excel (.From) issue

    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 .

    [vba]

    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"
    [/vba]

    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?
    Last edited by wolf.stalker; 05-04-2010 at 04:10 AM.

  2. #2
    VBAX Regular
    Joined
    Mar 2010
    Posts
    12
    Location
    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,
    Last edited by shawnhet; 05-09-2010 at 07:28 PM.

  3. #3
    VBAX Tutor lynnnow's Avatar
    Joined
    Jan 2005
    Location
    Mumbai, Maharashtra, India
    Posts
    299
    Location
    Shawn,

    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.

    Lincoln

  4. #4
    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.

  5. #5
    VBAX Tutor lynnnow's Avatar
    Joined
    Jan 2005
    Location
    Mumbai, Maharashtra, India
    Posts
    299
    Location
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •