Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to link to an Excel file when sending an email in Outlook? | Excel Discussion (Misc queries) | |||
Sheet vs File size when sending email in Outlook | Excel Discussion (Misc queries) | |||
How to get rid of the warning msg from Outlook when sending email via VBA code in Excel | Excel Programming | |||
How to get rid of the warning msg from Outlook when sending email via VBA code in Excel | Excel Programming | |||
sending email from excel using outlook express | Excel Programming |