#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Excel and Email

I am using this code to send emails from an excel workbook.

Is there a way to add the "From" information.

'Sub Mail_ActiveSheet_Body()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail


.To = "ABC.com"
.CC = "EFG.com"
.BCC = ""
.Subject = Sheets("trading").Range("A9").Value
.HTMLBody = SheetToHTML(ActiveSheet)
.Send 'or use .Display

Thank you in advance.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron de Bruin
 
Posts: n/a
Default Excel and Email

Hi Carl

With CDO it is possible but not with Outlook as far as i know.

See
http://www.rondebruin.nl/cdo.htm

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


"carl" wrote in message ...
I am using this code to send emails from an excel workbook.

Is there a way to add the "From" information.

'Sub Mail_ActiveSheet_Body()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail


.To = "ABC.com"
.CC = "EFG.com"
.BCC = ""
.Subject = Sheets("trading").Range("A9").Value
.HTMLBody = SheetToHTML(ActiveSheet)
.Send 'or use .Display

Thank you in advance.




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
Excel email address routing matt_gooner Excel Discussion (Misc queries) 1 May 23rd 06 07:09 PM
sending email from excel not working Tripp Excel Discussion (Misc queries) 2 February 1st 06 08:42 PM
how to open email from opt on line to excel danny58 New Users to Excel 3 January 2nd 06 05:04 PM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Problem opening excel files from email DXC001 Excel Discussion (Misc queries) 1 October 3rd 05 07:56 PM


All times are GMT +1. The time now is 10:14 PM.

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

About Us

"It's about Microsoft Excel"