LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default sending email without outlook messages

I've already checked out http://www.rondebruin.nl/mail/prevent.htm

I used the alt command to send the message. It worked great, but, all of a
sudden is not working anymore. I've downloaded the ClickYes program, but as
this application will be distributed widely I don't want to have to install
it on every computer.

The email is being created and displayed but not sent.

I've posted my code below. And I'm using xl2002 on xp Professional.

Thanks

Sub ResAlertForm_Email()
'This example send the last saved version of the Activeworkbook
'You must add a reference to the Microsoft outlook Library
Dim OutApp As Object
Dim OutMail As Object
Dim EmailAddr As String
Dim Subj As String

EmailAddr = Sheets("Reservation Alert Form").Range("T8")
Subj = Sheets("Reservation Alert Form").Range("B5") 'form title

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

With OutMail
.To = EmailAddr
.CC = ""
.BCC = ""
.Subject = "***TEST*** " & Subj
.Body = Subj
.Attachments.Add ActiveWorkbook.FullName
.Display 'or use .send and remove the next two lines
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%S"
End With
Set OutMail = Nothing
Set OutApp = Nothing

ActiveWorkbook.Save
ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub


 
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
How to link to an Excel file when sending an email in Outlook? BFree Excel Discussion (Misc queries) 2 May 1st 06 11:43 AM
Sheet vs File size when sending email in Outlook matchball Excel Discussion (Misc queries) 0 January 4th 06 07:48 PM
How to get rid of the warning msg from Outlook when sending email via VBA code in Excel Macgru Excel Programming 0 April 14th 05 09:30 PM
How to get rid of the warning msg from Outlook when sending email via VBA code in Excel Sunil Jayakumar Excel Programming 0 April 14th 05 11:11 AM
sending email from excel using outlook express Sam Excel Programming 2 August 28th 04 11:09 PM


All times are GMT +1. The time now is 11:34 PM.

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

About Us

"It's about Microsoft Excel"