Send Mail Q

  • Thread starter Thread starter Seanie
  • Start date Start date
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
 
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
 
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)
 
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
 
Thanks for your help Ron, I thought Excel 2007 had that feature, but
obviously I was wrong
 
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?
 
hi Seanie

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