Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sending email WITHOUT attaching a workbook?
I have already checked Ron de Bruin's excellent website but couldn't
find any procedure/function to send an email from Excel without using the .Sendmail function and having to attach a workbook? Therefore, does anybody know how I can simply send an email from Excel using VBA containing Recipient info, Subject and Body text? Many thanks, Adrian ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sending email WITHOUT attaching a workbook?
This is code I have used:
Sub sendemail() Dim olApp As Outlook.Application Set olApp = CreateObject("Outlook.Application") Dim olMail As Outlook.MailItem Set olMail = olApp.CreateItem(olMailItem) olMail.To = "recipient@......" olMail.Subject = "Automated e-mail" 'subject olMail.Body = "This is the body of the e-mail" olMail.Send End Sub You also have to add the Microsoft Outlook object Library to your file in order for VB to recognize the objects. In VBE, Click "ToolsReferences" and check the Microsoft Outlook Object library. HTH -----Original Message----- I have already checked Ron de Bruin's excellent website but couldn't find any procedure/function to send an email from Excel without using the .Sendmail function and having to attach a workbook? Therefore, does anybody know how I can simply send an email from Excel using VBA containing Recipient info, Subject and Body text? Many thanks, Adrian ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sending email WITHOUT attaching a workbook?
Hi Adrian
You don't look good<g http://www.rondebruin.nl/sendmail.htm#body -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Kobayashi" wrote in message ... I have already checked Ron de Bruin's excellent website but couldn't find any procedure/function to send an email from Excel without using the .Sendmail function and having to attach a workbook? Therefore, does anybody know how I can simply send an email from Excel using VBA containing Recipient info, Subject and Body text? Many thanks, Adrian ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sending Workbook to an email address. | Excel Discussion (Misc queries) | |||
Sending 1 worksheet of a workbook as email file attachment | Excel Discussion (Misc queries) | |||
Attaching to an email corrupts workbook | Excel Discussion (Misc queries) | |||
attaching tabs to email | Excel Discussion (Misc queries) | |||
sending a workbook by email to multiple recipients | Excel Programming |