Solved How to Make Replies to Emails sent from Ms access 2019 Go to Another Address in Outlook (1 Viewer)

ypma

Registered User.
Local time
Today, 13:49
Joined
Apr 13, 2012
Messages
643
By default, the email replies go to the email address that sent the email. I wish the reply to go to the enquires desk, email address. I have tried entering, dot reply “email address” in the code ,but without success . Any guidance on how I can achieve my aim would be appreciated



#.To = Email

.Reply = "office email address"

.Subject = "Application Submitted "

.Send

End With#
p.s i have forgotten how to add tags to the code , apologise
 

Minty

AWF VIP
Local time
Today, 13:49
Joined
Jul 26, 2013
Messages
10,368
You can try
.SendOnBehalf

BUT depending on the envoinment you (the person sending the email) may need permission on the account to enable it to work.
It can be a minefield in a corporate environment.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:49
Joined
Oct 29, 2018
Messages
21,454
Hi. Can't check the correct syntax right now, but have you tried ReplyTo?
Sent from phone...
 

ypma

Registered User.
Local time
Today, 13:49
Joined
Apr 13, 2012
Messages
643
Thank you theDBguy for you quick response . i have not tried that ,
You can try
.SendOnBehalf

BUT depending on the environment you (the person sending the email) may need permission on the account to enable it to work.
It can be a minefield in a corporate environment.
Minty and theDBguy, suggestions tried , however when email arrives the reply tab still wants to reply to the default sender .
Any other suggestions ? i have tried printing on the Email Reply to the following email address, however the precipitants still click the reply tab.


regards Ypma
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:49
Joined
Oct 29, 2018
Messages
21,454
Thank you theDBguy for you quick response . i have not tried that ,

Minty and theDBguy, suggestions tried , however when email arrives the reply tab still wants to reply to the default sender .
Any other suggestions ? i have tried printing on the Email Reply to the following email address, however the precipitants still click the reply tab.


regards Ypma
Hi. What happened when you tried them? I actually don't see a ReplyTo property, so that was wrong. But, I think Minty was close; except, try using SentOnBehalfOfName instead. If that doesn't work, try SendUsingAccount next. Cheers!
 

Gasman

Enthusiastic Amateur
Local time
Today, 13:49
Joined
Sep 21, 2011
Messages
14,234
Set the reply Email on the account itself?
 

sxschech

Registered User.
Local time
Today, 05:49
Joined
Mar 2, 2010
Messages
792
my set up uses what theDBguy suggested and it works. I have code to allow it to be an option as follows.

Code:
If sentfromshared = True Then
   .SentOnBehalfOfName = "person@email.com"
End If

In a previous job, we used a command line to achieve the effect, but would be better if can do it within vba.
 

ypma

Registered User.
Local time
Today, 13:49
Joined
Apr 13, 2012
Messages
643
Set the reply Email on the account itself?
Not a fair comment as i apologised in advance see my post 1 , remind me how to add tags would have been friendlier
 

ypma

Registered User.
Local time
Today, 13:49
Joined
Apr 13, 2012
Messages
643
my set up uses what theDBguy suggested and it works. I have code to allow it to be an option as follows.

Code:
If sentfromshared = True Then
   .SentOnBehalfOfName = "person@email.com"
End If

In a previous job, we used a command line to achieve the effect, but would be better if can do it within vba.
Thank you sxscheck , please advise based on my post 1 where should i insert the code you provided ?

Regards Ypma
 

Gasman

Enthusiastic Amateur
Local time
Today, 13:49
Joined
Sep 21, 2011
Messages
14,234
Not a fair comment as i apologised in advance see my post 1 , remind me how to add tags would have been friendlier
Really? why? I was talking about the account itself, when it is set up.? Nothing to do with code whatsoever?
Also I never mentioned anything about code tags (which I normally would :) )

For using code tags, see my signature.?
 

sxschech

Registered User.
Local time
Today, 05:49
Joined
Mar 2, 2010
Messages
792
In your post #1 I would guess to place it after the To?

Here is my code block example:
Code:
With Mailobject
            .bodyformat = 3      'Late binding in lieu of olFormatRichText
            .To = fwdto
            .CC = ccto
            If sentfromshared = True Then
                .SentOnBehalfOfName = "person@mail.com"
            End If
            .importance = ImportanceLevel
            .Subject = Subj
            .htmlbody = stBody & "<br>" & Signature
            'Attach file if included and it exists in the location specified
            If Len(attachfile) > 0 Then
                If Dir(attachfile) <> "" Then
                    .Attachments.Add (attachfile)
                Else
                    MsgBox attachfile & " not found.", vbOKOnly + vbInformation, "File Not Found"
                End If
            End If
            '.Send
            .Display  'Use for testing in lieu of .Send
        End With
 

ypma

Registered User.
Local time
Today, 13:49
Joined
Apr 13, 2012
Messages
643
In your post #1 I would guess to place it after the To?

Here is my code block example:
Code:
With Mailobject
            .bodyformat = 3      'Late binding in lieu of olFormatRichText
            .To = fwdto
            .CC = ccto
            If sentfromshared = True Then
                .SentOnBehalfOfName = "person@mail.com"
            End If
            .importance = ImportanceLevel
            .Subject = Subj
            .htmlbody = stBody & "<br>" & Signature
            'Attach file if included and it exists in the location specified
            If Len(attachfile) > 0 Then
                If Dir(attachfile) <> "" Then
                    .Attachments.Add (attachfile)
                Else
                    MsgBox attachfile & " not found.", vbOKOnly + vbInformation, "File Not Found"
                End If
            End If
            '.Send
            .Display  'Use for testing in lieu of .Send
        End With
I am a happy bunny! It works just how i desired. I did make one small change in that i used " if sentOnbehalfofName = true as apposed to if sent fromshared = True

Thanks again

Regards Ypma
 

Micron

AWF VIP
Local time
Today, 08:49
Joined
Oct 20, 2018
Messages
3,478
Also I never mentioned anything about code tags
Maybe your signature was mistaken for being part of your post/reply? I had that happen to me once when I had a sarcastic one about "like" and "uh" but it wasn't here. I got heck for accusing OP of writing something they didn't write.
 

sxschech

Registered User.
Local time
Today, 05:49
Joined
Mar 2, 2010
Messages
792
Ypma,

Glad you were able to make the code work for your situation.
 

Users who are viewing this thread

Top Bottom