![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Run-time error '287'
The following programme throws an error "Application-defined or Object-defined error" at "Mail.Send" Can anyone help me to automate outlook from excel VBA. Dim olApp As New Outlook.Application Dim Mail As Outlook.MailItem Set olApp = New Outlook.Application Set Mail = olApp.CreateItem(olMailItem) Mail.subject = "test" Mail.To = "ATH020" Mail.body = "Hi guys! this is a test mail" Mail.display Mail.Send Set Mail = Nothing Set olApp = Nothing |
Ads |
#2
|
|||
|
|||
![]() Probably that's subject to the Outlook security model. You can avoid that e.g. by using the Redemption (www.dimastr.com). One alternative would be to just display the message and let the user hit the Send button. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool: : http://www.vboffice.net/product.html?pub=6&lang=en Am Fri, 6 Jun 2008 04:25:01 -0700 schrieb Thirusivamani: Run-time error '287' The following programme throws an error "Application-defined or Object-defined error" at "Mail.Send" Can anyone help me to automate outlook from excel VBA. Dim olApp As New Outlook.Application Dim Mail As Outlook.MailItem Set olApp = New Outlook.Application Set Mail = olApp.CreateItem(olMailItem) Mail.subject = "test" Mail.To = "ATH020" Mail.body = "Hi guys! this is a test mail" Mail.display Mail.Send Set Mail = Nothing Set olApp = Nothing |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
sending mails from excel...but mail body disappearing | Jithu | Outlook and VBA | 0 | January 10th 08 01:57 PM |
Sending Emails from Excel | Pete | Outlook and VBA | 1 | March 25th 07 03:47 PM |
Sending emails in Excel by Outlook | tony wong | Outlook and VBA | 1 | December 23rd 06 04:17 PM |
Sending Mail from Excel with VBA | RFraley | Outlook and VBA | 4 | November 9th 06 05:33 PM |
Problem sending mail via excel | Jas | Outlook and VBA | 2 | April 8th 06 09:44 PM |