Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
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
Sending Workbook to an email address. Panagiotis Atmatzidis Excel Discussion (Misc queries) 4 April 21st 07 12:22 AM
Sending 1 worksheet of a workbook as email file attachment JLG Excel Discussion (Misc queries) 1 February 28th 06 03:15 AM
Attaching to an email corrupts workbook edger Excel Discussion (Misc queries) 1 February 10th 06 10:36 PM
attaching tabs to email please help Excel Discussion (Misc queries) 3 January 19th 05 07:50 PM
sending a workbook by email to multiple recipients keepitcool Excel Programming 6 September 4th 03 11:56 AM


All times are GMT +1. The time now is 11:42 AM.

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"