Send Mail Q

S

Seanie

I use Send Mail to e-mail various Excel reports with Ron de Bruins
excellent codes, but how can I send using an alias I have setup i.e
not the account I have set as my Outlook address & name

For eg. say if I want to send with:-
e-mail address = (e-mail address removed)
Name = Company Scores

I know there is a way I just can't seem to find it

Using Office 2007
 
M

mike

Seanie,

I did this to pull values for the alias from cells in the workbook with
likely similar code:

With iMsg
Set .Configuration = iConf
.To = ActiveSheet.Range("X32")
.CC = ""
.BCC = ""
.From = "" + ActiveSheet.Range("X35")
.Subject = ActiveSheet.Range("X34")
.TextBody = strbody
.AddAttachment TempFilePath & TempFileName & FileExtStr
' Request read receipt
.Fields("urn:schemas:mailheader:return-receipt-to") =
ActiveSheet.Range("X35")
.Fields("urn:schemas:mailheader:disposition-notification-to") =
ActiveSheet.Range("X35")
' Update fields
.Fields.Update
.Send
End With
 
S

Seanie

I probably should have expressed this differently. I have 2 accounts
set up in Outlook, is it possible via the Send Mail macro to select
the a/c which send out the mail? (other that using the sendonbehalfof
command above)
 
R

Ron de Bruin

It is possible but not easy I believe
I am working on it now for another person so If I know more I post it here
 
S

Seanie

Thanks for your help Ron, I thought Excel 2007 had that feature, but
obviously I was wrong
 
S

Seanie

Ron, the only thing I spotted is that in the recipients e-mail the To:
box shows the Outlook e-mail A/c I used to send the mail, although it
does get to the recipient. Is that normal in Outlook, or just your
code?
 
R

Ron de Bruin

hi Seanie

I see the name I type in the "Your Name" textbox in the properties of the account
 

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