ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sending mail (https://www.excelbanter.com/excel-programming/378800-re-sending-mail.html)

Ron de Bruin

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,









All times are GMT +1. The time now is 10:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com