Other Return Address

H

Harry

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
 
H

Harry

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
 
H

Harry

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
 
S

Sue Mosher [MVP-Outlook]

Show the relevant code, please.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
H

Harry

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
 
S

Sue Mosher [MVP-Outlook]

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

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Top