"class does not support automation or does not support expected interface"...what is tis error?...
tis is my code
Public Sub sentMail()
Dim objOutlook As New Outlook.Application
Dim objMessage As MailItem
Set objOutlook = CreateObject("Outlook.Application"
Set objMessage = objOutlook.CreateItem(olMailItem)
With objMessage
.To = "xxx@hotmail.com"
.Subject = "Report"
.Body = "test"
.Attachments.Add "C:\Report.doc"
.Send
End With
Set objOutlook = Nothing
Set objMessage = Nothing
end sub
tis is my code
Public Sub sentMail()
Dim objOutlook As New Outlook.Application
Dim objMessage As MailItem
Set objOutlook = CreateObject("Outlook.Application"
Set objMessage = objOutlook.CreateItem(olMailItem)
With objMessage
.To = "xxx@hotmail.com"
.Subject = "Report"
.Body = "test"
.Attachments.Add "C:\Report.doc"
.Send
End With
Set objOutlook = Nothing
Set objMessage = Nothing
end sub