A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Other Return Address



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 28th 07, 12:04 AM posted to microsoft.public.outlook.program_vba
Harry
external usenet poster
 
Posts: 17
Default Other Return Address

Hello All,

I'm using a form within my access to send mail through the default
account/profile.
Although I was able to change the settings for the read receipt and delivery
receipt I do not succeed to change the reply-address (have replies send to
value) to an address other then my own.

Within the VBA I have is mentioned
dim strReturnAddress="the-other-mailadres"

.OriginatorDeliveryReportRequested = (Me.EmailDeliveryRequest.Value)
.ReadReceiptRequested = (Me.EmailReadRequest.Value)
. ?????? = (strReturnAddress)
Has anyone an idea?

Greetings,
Harry

Ads
  #2  
Old March 28th 07, 12:57 AM posted to microsoft.public.outlook.program_vba
Harry
external usenet poster
 
Posts: 17
Default Other Return Address

Hi Sue,

Just taking a new and maybe more clear view to the code I found out what to
do.
just writing down
.ReplyRecipients.Add (strAddressReply)
and it all works fine.

Anyhow Thank you a lot for your help.
greetings,
Harry

"Sue Mosher [MVP-Outlook]" wrote:

Show the relevant code, please.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Harry" wrote:

however I think I did something wrong. The recepients.add function does not
implement my required return address.
Although I send a mail out of my primary address I would like to have the
recipient to reply automatically towards an other address. so the return
address should be different from the originator address.

"Sue Mosher [MVP-Outlook]" wrote:

Use the Add method for the ReplyRecipients collection.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Harry" wrote:

I'm using a form within my access to send mail through the default
account/profile.
Although I was able to change the settings for the read receipt and delivery
receipt I do not succeed to change the reply-address (have replies send to
value) to an address other then my own.

Within the VBA I have is mentioned
dim strReturnAddress="the-other-mailadres"

.OriginatorDeliveryReportRequested = (Me.EmailDeliveryRequest.Value)
.ReadReceiptRequested = (Me.EmailReadRequest.Value)
. ?????? = (strReturnAddress)


  #3  
Old March 28th 07, 02:03 AM posted to microsoft.public.outlook.program_vba
Harry
external usenet poster
 
Posts: 17
Default Other Return Address

Hi Sue,

sorry I forgot to add the code.
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookReplyTo As Outlook.Recipients
(the used strings are defined ok)

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
' adding the strAddressTO.
Set objOutlookRecip = .Recipients.Add(strAddressTO)
objOutlookRecip.Type = olTo
Set objOutlookReplyTo = .Recipients.Add(strAddressReply)
objOutlookRecip.Type = olReply
end with

The above code results in Error 13 Type Mismatch

Without the entry for the reply address all works fine.

Greetings,
Harry
"Sue Mosher [MVP-Outlook]" wrote:

Show the relevant code, please.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Harry" wrote:

however I think I did something wrong. The recepients.add function does not
implement my required return address.
Although I send a mail out of my primary address I would like to have the
recipient to reply automatically towards an other address. so the return
address should be different from the originator address.

"Sue Mosher [MVP-Outlook]" wrote:

Use the Add method for the ReplyRecipients collection.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Harry" wrote:

I'm using a form within my access to send mail through the default
account/profile.
Although I was able to change the settings for the read receipt and delivery
receipt I do not succeed to change the reply-address (have replies send to
value) to an address other then my own.

Within the VBA I have is mentioned
dim strReturnAddress="the-other-mailadres"

.OriginatorDeliveryReportRequested = (Me.EmailDeliveryRequest.Value)
.ReadReceiptRequested = (Me.EmailReadRequest.Value)
. ?????? = (strReturnAddress)


  #4  
Old March 28th 07, 02:44 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Other Return Address

Use the Add method for the ReplyRecipients collection.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"Harry" wrote:

Hello All,

I'm using a form within my access to send mail through the default
account/profile.
Although I was able to change the settings for the read receipt and delivery
receipt I do not succeed to change the reply-address (have replies send to
value) to an address other then my own.

Within the VBA I have is mentioned
dim strReturnAddress="the-other-mailadres"

.OriginatorDeliveryReportRequested = (Me.EmailDeliveryRequest.Value)
.ReadReceiptRequested = (Me.EmailReadRequest.Value)
. ?????? = (strReturnAddress)
Has anyone an idea?

Greetings,
Harry

  #5  
Old March 28th 07, 02:52 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Other Return Address

Show the relevant code, please.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Harry" wrote:

however I think I did something wrong. The recepients.add function does not
implement my required return address.
Although I send a mail out of my primary address I would like to have the
recipient to reply automatically towards an other address. so the return
address should be different from the originator address.

"Sue Mosher [MVP-Outlook]" wrote:

Use the Add method for the ReplyRecipients collection.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Harry" wrote:

I'm using a form within my access to send mail through the default
account/profile.
Although I was able to change the settings for the read receipt and delivery
receipt I do not succeed to change the reply-address (have replies send to
value) to an address other then my own.

Within the VBA I have is mentioned
dim strReturnAddress="the-other-mailadres"

.OriginatorDeliveryReportRequested = (Me.EmailDeliveryRequest.Value)
.ReadReceiptRequested = (Me.EmailReadRequest.Value)
. ?????? = (strReturnAddress)


  #6  
Old March 28th 07, 03:00 AM posted to microsoft.public.outlook.program_vba
Harry
external usenet poster
 
Posts: 17
Default Other Return Address

Hello Sue,

Thank you for your answer.
however I think I did something wrong. The recepients.add function does not
implement my required return address.
Although I send a mail out of my primary address I would like to have the
recipient to reply automatically towards an other address. so the return
address should be different from the originator address.

Greetings,
Harry

"Sue Mosher [MVP-Outlook]" wrote:

Use the Add method for the ReplyRecipients collection.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"Harry" wrote:

Hello All,

I'm using a form within my access to send mail through the default
account/profile.
Although I was able to change the settings for the read receipt and delivery
receipt I do not succeed to change the reply-address (have replies send to
value) to an address other then my own.

Within the VBA I have is mentioned
dim strReturnAddress="the-other-mailadres"

.OriginatorDeliveryReportRequested = (Me.EmailDeliveryRequest.Value)
.ReadReceiptRequested = (Me.EmailReadRequest.Value)
. ?????? = (strReturnAddress)
Has anyone an idea?

Greetings,
Harry

  #7  
Old March 28th 07, 01:31 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Other Return Address

Why didn't you use the the Add method for the ReplyRecipients collection, as I suggested?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Harry" wrote in message ...
Hi Sue,

sorry I forgot to add the code.
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookReplyTo As Outlook.Recipients
(the used strings are defined ok)

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
' adding the strAddressTO.
Set objOutlookRecip = .Recipients.Add(strAddressTO)
objOutlookRecip.Type = olTo
Set objOutlookReplyTo = .Recipients.Add(strAddressReply)
objOutlookRecip.Type = olReply
end with

The above code results in Error 13 Type Mismatch

Without the entry for the reply address all works fine.


"Harry" wrote:

however I think I did something wrong. The recepients.add function does not
implement my required return address.
Although I send a mail out of my primary address I would like to have the
recipient to reply automatically towards an other address. so the return
address should be different from the originator address.

"Sue Mosher [MVP-Outlook]" wrote:

Use the Add method for the ReplyRecipients collection.

"Harry" wrote:

I'm using a form within my access to send mail through the default
account/profile.
Although I was able to change the settings for the read receipt and delivery
receipt I do not succeed to change the reply-address (have replies send to
value) to an address other then my own.

Within the VBA I have is mentioned
dim strReturnAddress="the-other-mailadres"

.OriginatorDeliveryReportRequested = (Me.EmailDeliveryRequest.Value)
.ReadReceiptRequested = (Me.EmailReadRequest.Value)
. ?????? = (strReturnAddress)


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can an email I send display a different email return address? JML Outlook - Installation 2 March 11th 07 02:11 AM
Return to IE 6 William Outlook Express 1 September 30th 06 03:15 AM
return receipt stef Outlook - General Queries 9 September 24th 06 04:21 AM
Outlook return address issues Joejean Outlook - Installation 0 June 24th 06 07:30 PM
return values Reg Outlook - General Queries 3 February 27th 06 11:24 AM


All times are GMT +1. The time now is 02:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.