E
Emmett Power
Hi I have a piece of VB code that:
Was working fine until today; and
Works fine on another machine
The code generates the follow error message:
'Runtime error -2147467259(80004005) Automation Error Unspecified Error'
I have Windows 2000/OL 2002, the other machine has W98/OL 2002.
The error occurs at the following line in code that I have set out below:
'Set c = ol.CreateItem(olMailItem)'
The code is as follows:
'Sub SendEmail()
Dim contacts As Outlook.ContactItem
Dim c As Outlook.MailItem
Dim ol As New Outlook.Application
Dim strMsg
Set olSelectContacts = Application.ActiveExplorer.Selection
For Each contact In olSelectContacts
Set c = ol.CreateItem(olMailItem)
c.To = contact.Email1Address
c.CC = contact.Email3Address
Etc
c.Body = strMsg
c.Save
c.Send
Next
End Sub'
Any suggestions would be appreciated.
Regards
Emmett Power
Was working fine until today; and
Works fine on another machine
The code generates the follow error message:
'Runtime error -2147467259(80004005) Automation Error Unspecified Error'
I have Windows 2000/OL 2002, the other machine has W98/OL 2002.
The error occurs at the following line in code that I have set out below:
'Set c = ol.CreateItem(olMailItem)'
The code is as follows:
'Sub SendEmail()
Dim contacts As Outlook.ContactItem
Dim c As Outlook.MailItem
Dim ol As New Outlook.Application
Dim strMsg
Set olSelectContacts = Application.ActiveExplorer.Selection
For Each contact In olSelectContacts
Set c = ol.CreateItem(olMailItem)
c.To = contact.Email1Address
c.CC = contact.Email3Address
Etc
c.Body = strMsg
c.Save
c.Send
Next
End Sub'
Any suggestions would be appreciated.
Regards
Emmett Power