Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sendin email with Excel macros

Hi, I use this code to send multiple email, but I get a "run time error
438" with .From field, as if it isn't supported.

Does anyone known the solution?


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.From = "
.To = IndirizzoEmail
.Subject = Oggetto
.Body = TestoEmail
.OriginatorDeliveryReportRequested = False
.Display
End With
Set OutMail = Nothing

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Sendin email with Excel macros

Do you need to have a From line as I think it populates it with the
default user anyway.
Don't forget to set your OutApp = nothing at the end also.

FunkySquid

Maurizio wrote:
Hi, I use this code to send multiple email, but I get a "run time error
438" with .From field, as if it isn't supported.

Does anyone known the solution?


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.From = "
.To = IndirizzoEmail
.Subject = Oggetto
.Body = TestoEmail
.OriginatorDeliveryReportRequested = False
.Display
End With
Set OutMail = Nothing


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Sendin email with Excel macros

Not possible with Outlook

With CDO you can do it
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ps.com...
Hi, I use this code to send multiple email, but I get a "run time error
438" with .From field, as if it isn't supported.

Does anyone known the solution?


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.From = "
.To = IndirizzoEmail
.Subject = Oggetto
.Body = TestoEmail
.OriginatorDeliveryReportRequested = False
.Display
End With
Set OutMail = Nothing



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sendin email with Excel macros

I've used:

..SentOnBehalfOfName = "

It works!!!!!

Regard Maurizio

Ron de Bruin ha scritto:

Not possible with Outlook

With CDO you can do it
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ps.com...
Hi, I use this code to send multiple email, but I get a "run time error
438" with .From field, as if it isn't supported.

Does anyone known the solution?


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.From = "
.To = IndirizzoEmail
.Subject = Oggetto
.Body = TestoEmail
.OriginatorDeliveryReportRequested = False
.Display
End With
Set OutMail = Nothing


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Sendin email with Excel macros

Hi Maurizio

You are correct



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ups.com...
I've used:

.SentOnBehalfOfName = "

It works!!!!!

Regard Maurizio

Ron de Bruin ha scritto:

Not possible with Outlook

With CDO you can do it
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ps.com...
Hi, I use this code to send multiple email, but I get a "run time error
438" with .From field, as if it isn't supported.

Does anyone known the solution?


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.From = "
.To = IndirizzoEmail
.Subject = Oggetto
.Body = TestoEmail
.OriginatorDeliveryReportRequested = False
.Display
End With
Set OutMail = Nothing






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Sendin email with Excel macros

Some more that I not use myself

SentOnBehalfOfName
SenderName
ReceivedByName
ReceivedOnBehalfOfName
ReplyRecipientNames
SenderEmailAddress


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi Maurizio

You are correct



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ups.com...
I've used:

.SentOnBehalfOfName = "

It works!!!!!

Regard Maurizio

Ron de Bruin ha scritto:

Not possible with Outlook

With CDO you can do it
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ps.com...
Hi, I use this code to send multiple email, but I get a "run time error
438" with .From field, as if it isn't supported.

Does anyone known the solution?


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.From = "
.To = IndirizzoEmail
.Subject = Oggetto
.Body = TestoEmail
.OriginatorDeliveryReportRequested = False
.Display
End With
Set OutMail = Nothing






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Sendin email with Excel macros

Another tip

'Change Sender name and reply address
'The receiver can see the original mail address in the properties if he want
.SentOnBehalfOfName = """SenderName"" "


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi Maurizio

You are correct



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ups.com...
I've used:

.SentOnBehalfOfName = "

It works!!!!!

Regard Maurizio

Ron de Bruin ha scritto:

Not possible with Outlook

With CDO you can do it
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maurizio" wrote in message ps.com...
Hi, I use this code to send multiple email, but I get a "run time error
438" with .From field, as if it isn't supported.

Does anyone known the solution?


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.From = "
.To = IndirizzoEmail
.Subject = Oggetto
.Body = TestoEmail
.OriginatorDeliveryReportRequested = False
.Display
End With
Set OutMail = Nothing






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
email without macros chrisnsmith Excel Discussion (Misc queries) 4 February 13th 09 09:45 PM
Macros - Converting Excel spreadheet to Outlook email Clyde Excel Discussion (Misc queries) 1 April 6th 08 04:10 PM
Excel and Outlook Email Macros John Michl Excel Programming 2 April 24th 06 02:22 PM
How do I send/email macros from my excel workbook to someone else? Drea Excel Worksheet Functions 1 August 10th 05 08:08 PM
Email templates & Excel Macros Andrew[_27_] Excel Programming 2 February 20th 04 06:29 AM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"