Outlook Macro - Sender Name vs Sender Email

JHSimmonsAOD 0 Reputation points
2023-09-06T14:06:24.94+00:00

I have created two macros to be able to reply to email messages with a template. However, when I run the macros, it puts the sender's name in the To: field instead of the sender's email address. I have the line replyEmail.To = origEmail.Sender in the macro. Can anyone help me with this? Thanks!

John

Outlook
Outlook
A family of Microsoft email and calendar products.
4,504 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,345 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SokiGuo-MSFT 31,466 Reputation points Microsoft External Staff
    2023-09-07T06:13:11.4333333+00:00

    Hi @JHSimmonsAOD

    Welcome to our forum!

    Looks like the issue is more related to Office development, please kindly understand that the Outlook tag here we mainly focus on general issues about Outlook desktop client. The following is for informational purposes only.


    According to my search, if you wish to retrieve the fully qualified email address of the sender, use the SenderEmailAddress property. More information, see:  

    MailItem.SenderName property (Outlook) | Microsoft Learn.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.