Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming, microsoft.public.outlook
PWS PWS is offline
external usenet poster
 
Posts: 18
Default Sending Email - different reply-to address

Apologies for cross posting, please understand I did not know which
group would be best.

I have the following code in Excel which creates an EMail

Dim olApp As Object
Dim olMail As Object
Set olApp = CreateObject("Outlook.application")
Set olMail = olApp.CreateItem(0)

With olMail
.To = sRecipientList
.Subject = "FI Secondary Bond Trading Daily P&L Report"
.HTMLBody = RangetoHTML(Range("nTableData"))
.Display
End With

Set olMail = Nothing
Set olApp = Nothing


What I would like is to either send this Email from another Account,
so that the replies all come back to that Email account

OR

Set the reply-to address on the Email to that other Email address
where all repleis will be sent to.

I would apprecaite anyone's insight and code [smile]

PWS
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook
external usenet poster
 
Posts: 11,123
Default Sending Email - different reply-to address

Hi PWS

See the tips page
http://www.rondebruin.nl/mail/tips2.htm

If you want to change the sender name and reply address add this code line

'The receiver can see the original mail address in the properties if he want
..SentOnBehalfOfName = """SenderName"" "



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"PWS" wrote in message ...
Apologies for cross posting, please understand I did not know which
group would be best.

I have the following code in Excel which creates an EMail

Dim olApp As Object
Dim olMail As Object
Set olApp = CreateObject("Outlook.application")
Set olMail = olApp.CreateItem(0)

With olMail
.To = sRecipientList
.Subject = "FI Secondary Bond Trading Daily P&L Report"
.HTMLBody = RangetoHTML(Range("nTableData"))
.Display
End With

Set olMail = Nothing
Set olApp = Nothing


What I would like is to either send this Email from another Account,
so that the replies all come back to that Email account

OR

Set the reply-to address on the Email to that other Email address
where all repleis will be sent to.

I would apprecaite anyone's insight and code [smile]

PWS

  #3   Report Post  
Posted to microsoft.public.excel.programming, microsoft.public.outlook
PWS PWS is offline
external usenet poster
 
Posts: 18
Default Sending Email - different reply-to address

Thanks Ron that code worked great....

Flushed with that success I was asked to do a similar thing with this
code...

With ActiveSheet.MailEnvelope
.Item.BCC = sRecipientList (an array of Email addresses)
.Item.Subject = "Subject"
End With

I tried adding: .Item.sentOnBehalfOfName = """MySenderName ""
<MySenderEmailAddress"

I could not find any info on the properties of the MailEnvelope, can
you suggest what I need to do in this instance.


On Dec 11, 9:04 pm, "Ron de Bruin" wrote:
Hi PWS

See the tips pagehttp://www.rondebruin.nl/mail/tips2.htm

If you want to change the sender name and reply address add this code line

'The receiver can see the original mail address in the properties if he want
.SentOnBehalfOfName = """SenderName"" "

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.outlook
external usenet poster
 
Posts: 11,123
Default Sending Email - different reply-to address

Hi PWS

Never Try this and there is also nothing in the Help.
I never use MailEnvelope myself but I will try to find a answer for you

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"PWS" wrote in message ...
Thanks Ron that code worked great....

Flushed with that success I was asked to do a similar thing with this
code...

With ActiveSheet.MailEnvelope
.Item.BCC = sRecipientList (an array of Email addresses)
.Item.Subject = "Subject"
End With

I tried adding: .Item.sentOnBehalfOfName = """MySenderName ""
<MySenderEmailAddress"

I could not find any info on the properties of the MailEnvelope, can
you suggest what I need to do in this instance.


On Dec 11, 9:04 pm, "Ron de Bruin" wrote:
Hi PWS

See the tips pagehttp://www.rondebruin.nl/mail/tips2.htm

If you want to change the sender name and reply address add this code line

'The receiver can see the original mail address in the properties if he want
.SentOnBehalfOfName = """SenderName"" "

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

  #5   Report Post  
Posted to microsoft.public.excel.programming, microsoft.public.outlook
PWS PWS is offline
external usenet poster
 
Posts: 18
Default Sending Email - different reply-to address

I used this technique because it was so simple... until I wanted to
send from another account.

Using the mailEnvelope technique I am able to send worksheets with
images on them without having to go through the HTMl route. It works
really well just seems totally undocumented.

I appreciate your offer to try to find an answer.

PWS


On Dec 13, 12:33 am, "Ron de Bruin" wrote:
Hi PWS

Never Try this and there is also nothing in the Help.
I never use MailEnvelope myself but I will try to find a answer for you

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot open email reply to previous question CatLoverx6 Excel Discussion (Misc queries) 1 August 4th 08 11:14 PM
Sending Workbook to an email address. Panagiotis Atmatzidis Excel Discussion (Misc queries) 4 April 21st 07 12:22 AM
Reply to different address Shaun Excel Programming 3 August 28th 06 09:20 PM
To: Gary's Student cell address reply ppbedz Excel Discussion (Misc queries) 5 April 17th 06 10:47 PM
Sending email via VB - address length Carl Woodall Excel Programming 3 January 22nd 04 05:08 PM


All times are GMT +1. The time now is 06:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"