Solved

Simple mailenvelope question

Posted on 2011-03-11
6
410 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

746 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

8 Experts available now in Live!

Get 1:1 Help Now