Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 = Name = Company Scores I know there is a way I just can't seem to find it Using Office 2007 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 "Seanie" wrote: 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 = Name = Company Scores I know there is a way I just can't seem to find it Using Office 2007 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That may have been a little vague (my last post)
Try changing the ".From" line to: ..From = "company scores " Mike "Seanie" wrote: 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 = Name = Company Scores I know there is a way I just can't seem to find it Using Office 2007 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use this is you use my Outlook object model examples
.SentOnBehalfOfName = """SenderName"" " -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Seanie" wrote in message ... 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 = Name = Company Scores I know there is a way I just can't seem to find it Using Office 2007 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I add the line .SentOnBehalfOfName = """SenderName""
" The From: line on the actual mail sent displays as:- Joe Bloggs ]; on behalf of; Company Scores ] What I wanted to achieve is for the From line just to contain:- Company Scores ] Is this possible i.e. drop the "sent on behalk of"? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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) |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Seanie" wrote in message ... When I add the line .SentOnBehalfOfName = """SenderName"" " The From: line on the actual mail sent displays as:- Joe Bloggs ]; on behalf of; Company Scores ] What I wanted to achieve is for the From line just to contain:- Company Scores ] Is this possible i.e. drop the "sent on behalk of"? |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your help Ron, I thought Excel 2007 had that feature, but
obviously I was wrong |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am working on new examples now
In 2007 we can use SendUsingAccount -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Seanie" wrote in message ... Thanks for your help Ron, I thought Excel 2007 had that feature, but obviously I was wrong |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this new page
Use the Account you want in mail macro in Excel/Outlook 2007 http://www.rondebruin.nl/mail/account.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Seanie" wrote in message ... 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 = Name = Company Scores I know there is a way I just can't seem to find it Using Office 2007 |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron, worked like a dream
|
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi Seanie
I see the name I type in the "Your Name" textbox in the properties of the account -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Seanie" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Bypass: A program is trying to send mail using Item.Send prompt | Excel Discussion (Misc queries) | |||
Not able to send Mail - Ron de | Excel Programming | |||
A program is trying to send mail using Item.Send | Excel Programming | |||
Send e-mail with CDO | Excel Programming | |||
Send Mail | Excel Programming |