Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Sending mail

Hi David

You miss the send line

Download a example workbook from my site or copy past a example
http://www.rondebruin.nl/sendmail.htm

--

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



"David Gerstman" wrote in message
...
I have a VBA application in which I select information from a spreadsheet
and
send it off to different recipients.

First I set up the Outlook Application with this code:

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

And yes I've included the Outlook Object rererence.

When it's time to send I use the following code:

With OutMail
.To = send_to
.Subject = sub_line
.Body = sum_text
End With

Where each of the variables are stirngs. My problem is that while I'm not
getting any errors, this isn't sending anything.

I cut and paste the Outlook sections from another program that works. So
did
I miss copying something? I've gone over my code and I haven't seen
anything
missing. What could be wrong here.

Thanks,







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 Mail using VBA [email protected] Excel Programming 1 July 2nd 06 03:42 PM
General mail failure when sending e-mail from Excel Adrienne Excel Discussion (Misc queries) 5 November 4th 05 12:59 PM
Help sending mail... Dick Kusleika[_3_] Excel Programming 1 August 13th 04 04:13 AM
Help sending mail... Bob Phillips[_6_] Excel Programming 1 August 12th 04 08:50 PM


All times are GMT +1. The time now is 06:30 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"