Run-time error using the CDO object

D

DagL

Hello!

I am doing some research on using the CDO object. I found some code that
should give me the possibility to create a calender message for an
appointment. But, I get an error that I do not know why I get. I have googled
the error, but it seems to be an error caused by wrong datatypes in updating
databases. I am not even close to an database table, so this cannot be the
case here. I have also tried to comment out the lines of setting data, if it
could be wrong. Especially setting of date and time. But, this has had no
effect.

This is the code:
Dim objAppt As New Appointment
Dim objReq As New CalendarMessage

objAppt.Subject = "MEC 99"
objAppt.StartTime = "10/4/99 1:00PM"
objAppt.EndTime = "10/4/99 2:00PM"
objAppt.Attendees.Add ("(e-mail address removed)")

Set objReq = objAppt.CreateRequest
objReq.Message.Send


The error occurs when executing the line "Set objReq = objAppt.CreateRequest"

The full error code is:
Run-time error '-2147217887(80040e21)':
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if avaliable. No work was done

I use MS Access 2007, and the CDO component is in the file CDOEX.DLL.

I hope someone can give me a hint about what could be wrong.

Best regards
Dagl
 
R

Ralph

Is there a reason you need to use CDO? Microsoft does not ship CDO for Office
2007. At any rate why not use the Outlook object model to accomplish this.
Take a look at the MeetingItem object in the Help.
 
D

DagL

Hello!

The reason why we use CDO, is that here we found a easy way to connect to
the email server even if it resides on Citrix. A lot of our customers, and my
firm itself, use Citrix where the email server resides. Using the Outlook
object, I was not able to set the adress to the email server when outlook not
was installed locally. Maybe I overlooked something?

Are you saying that CDO will not work on Outlook 2007? Or some future
version of Outlook?

We are not familiar with writing against this objects, so I am very grateful
for some help around this matters.

Best regards
Dagl
 
D

DagL

Thank you very much for your answer. I will look into the code you referenced
to below now. But, I got a bit worried about what you said about CDO. Maybe I
should try another way? Is there any other possibilities when I must
communicate with an email server residing on Citrix?

I think I take this in a new thread.

Thank you very much for your help so far.

Best regards
Dagl
 

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