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