Solved

Simple mailenvelope question

Posted on 2011-03-11
6
438 Views
Last Modified: 2012-05-11
Hello Experts,

I am trying to get a simple mail item to send FROM a specific distro list. I am able to get all of the other fields filled out but I am unable to find the proper key words to define an address in the "From" field on the email.

Thank you,

John
With ActiveSheet.MailEnvelope
   .Introduction = ""
   .Item.To = "RP CC Desks"
   .Item.Subject = ActiveSheet.Range("r83").Value
end with

Open in new window

0
Comment
Question by:redrp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35113753
>>I am trying to get a simple mail item to send FROM a specific distro list.

ActiveSheet.MailEnvelope.Item returns an Outlook.MailItem that works just like any other mail item in Outlook. You don't need to populate the "From" as it will go through the default Account.

If that is not what you are asking then could you please explain it a little more?

Sid
0
 

Author Comment

by:redrp
ID: 35113857
I need to change it from the default to be from a specific person.


John
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35113868
One way I can think of is to use the .SentOnBehalfOfName property. If I am not wrong then that will change the sender name and reply address. However the receiver can still see the original mail address in the properties if he/she wants

    .SentOnBehalfOfName = """SenderName"" <Reply@Address.com>"

Also see this link.

http://www.rondebruin.nl/mail/account.htm

Sid
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:redrp
ID: 35113900
Hey Sid,

The Sentonbehalfofname works specificly for when you define the mailitem as an object. The Mailenvelope opens up the email options within excel itself and not the email as a seperate object. I can go that route and create the outlook item but i was just curious if it was possible to set the 'from' field w/o doing that.

Thanks,

John
0
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 250 total points
ID: 35113909
Then see the link which I gave in ID: 35113868, which changes the default account so that you do not need to specify a "From" name :)

Sid
0
 

Author Comment

by:redrp
ID: 35113997
Hey Sid,

Setting the default account only works when you have the email setup as a seperate object. Based on my conversation with you and my own research I do not believe it is possible to set the From field using VB. Thanks for your time :)

John
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question