CDO throwing Access Denied error in Outlook 2003

B

Bala

Hi,

Whenever i access the Messages property of the Contact MAPI Folder,
i am getting the following error

Collaboration Data Objects
Message : [Collaboration Data Objects - [E_ACCESSDENIED(80070005)]]

What could be the prob?

Thanks
Bala
 
K

Ken Slovak - [MVP - Outlook]

I'm not sure what the problem is, your code works fine here but it
does throw up the address book access security prompt before access to
the contacts folder is allowed.

Are you using the Beta 2 refresh? It's possible that access to
contacts was more severely restricted in earlier beta versions,
although I haven't seen any bugs about that and don't recall any
problems with any of my CDO code when running under earlier beta
versions.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
B

Bala

I am using 2003 Beta(11.4920.4920)BETA version
, Is this one is Beta 2 refresh? if not let me install the newer version.

Thanks
Bala


Ken Slovak - said:
I'm not sure what the problem is, your code works fine here but it
does throw up the address book access security prompt before access to
the contacts folder is allowed.

Are you using the Beta 2 refresh? It's possible that access to
contacts was more severely restricted in earlier beta versions,
although I haven't seen any bugs about that and don't recall any
problems with any of my CDO code when running under earlier beta
versions.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Bala said:
Hi Ken,
Here is the sample code which causes this error

And i have installed the CDO1.21 library.

------Code----
Set objSession = CreateObject("MAPI.Session")

'Login - if already outlook runs it uses existing session
objSession.Logon , , False, False

Set objFolder =
objSession.GetDefaultFolder(CdoDefaultFolderContacts)

Set objMessages = objFolder.Messages

Here i am getting Access denied error....
--------

One more thing, This error occurs only in Outlook 2003 and it
works fine in Outlook XP.

Thanks
Bala
 

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