T
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
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