Changing From: emailing with Excel...

A

adimax

Hello all. Looking to add the finishing touch to this code I snagged
off a post someone made in this group (I apologize for not being able
to give credit to the author; this was 3-4 months ago). It's working
great for what I need it to do, but I wanted to change the From: field/
property in Outlook (ver 2003).

I went in and added the 'From = ' field and the VBA code seems fine
with it, but when I run a test email to myself using the code either
with .Display or .Send, my own email address on the Exchange server
I'm on shows up as the sender/if I reply.
From my experience with Outlook in the past, I thought it was this
From field that dictated who the receiver would reply to... am I
mistaken? And if not, how can I change it? Or how can I essentially
send from email address A to B, but have B return it to C if they
reply.

(C will not be using Excel or Outlook, just whatever client they
happen to have... Eudora... Gmail... etc)

/code snippet

On Error Resume Next
With OutMail
.To = "" & TextBox1 & ""
.From = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "Test"

.Body = "Hello!"

'.Attachments.Add wb2.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
'.Send
.Display
End With

/end code

Thanks in advance!

Benjamin
 
A

adimax

Ron,

You are absolutely amazing. That page had exactly what I needed and SO
much more. Thank you so, so, so very much.

And is that a world record for most timely response? :)

Benjamin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top