Runtime error -2147467259(80004005)

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top