0 votes
in VBA by Beginner (65 points)

I am sending an email as quoted in this great article:

The problem is that the recipient of the message only sees my address and not my name (even though I'm kept in their contacts)

by Super Expert (3.2k points)
That's a good observation. What if you changed ".From" to ".Sender" with your email address?
by Beginner (65 points)

You were right, if I add:

  .Sender = "MyEmail@gmail.com"

And I also change:

.From = "My Name"

It works great
Thank you

by Beginner (65 points)
How do I mark your answer as "best" ?
by Beginner (65 points)
Is it possible to attach an image that will serve as a link ?
by Super Expert (3.2k points)
Awesome! I added an answer with the suggestions from our comments and marked it as complete. I'm glad it worked!

There's an .HTMLBody property and a believe you might be able to do something that way, though I don't think I've tried it with an image.

1 Answer

+1 vote
by Super Expert (3.2k points)
selected by
Best answer

To make the email display your name instead of your email address, remove your email address from .From and add the following code:

  .Sender = "YourEmail@gmail.com"
  .From = "Your Name"

I'll update the tutorial with this tip!

Welcome to wellsr Q&A
Ask any questions you have about VBA and Python and our community will help answer them. wellsr Q&A is the standalone question and answer platform for wellsr.com. If you have a question about one of our specific tutorials, please include a link back to the tutorial.

Getting Started
VBA Cheat Sheets (On Sale Now)

Looking for something else? Hire our team directly through ourVBA Help page, instead.

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.