Solved

Simple mailenvelope question

Posted on 2011-03-11
6
413 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now