Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simple mailenvelope question

Posted on 2011-03-11
6
Medium Priority
?
476 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

971 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