Results 1 to 3 of 3

Thread: *RESOLVED* CDO 1.21 problems after security update

  1. #1

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    *RESOLVED* CDO 1.21 problems after security update

    A client asked for word templates, which use the exchange server's global address list to get address information.

    The method that used to work, doesn't work anymore when the CDO security patch is installed.
    The configuration is:
    Outlook 2000
    Word 97
    Exchange server (5.5?)

    I am using the AddressBook method of CDO's session object.
    According to Microsofts documentation, a dialog box should appear, asking the user to allow access to the address list.
    This dialog box does not appear, instead a runtime error occurs as soon as I try to read the selected recipient.
    The error is E_ACCESSDENIED(80070005)

    Why doesn't the dialog box appear, and is access blocked?
    Should I tell my client that the job can't be done?

    Here is the sample code I used:
    VB Code:
    1. Private Sub CommandButton1_Click()
    2. Dim ses As MAPI.Session
    3. Dim recs As MAPI.Recipients
    4. Dim rec As MAPI.Recipient
    5.     Set ses = New MAPI.Session
    6.     ses.Logon "MS Exchange Settings"
    7.     Set recs = ses.AddressBook(, "Selecteer een ontvanger", 1, 1, 1)
    8.     Set rec = recs.Item(1) ' this is where i get the error
    9.     Me.txtAchternaam.Text = rec.Name
    10.     Set rec = Nothing
    11.     Set recs = Nothing
    12.     ses.Logoff
    13.     Set ses = Nothing
    14. End Sub

    Any information is appreciated.
    I am also open for alternative methods to read the exchange server's global address list, but I need to be able to access several exchange specific fields in the addressentry, so using the Outlook object model is not an option.
    Last edited by Frans C; Dec 13th, 2002 at 09:26 AM.

  2. #2
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    We would be interested in what you had to do to get this working....

    Was it an error in the CDO update? or where?

  3. #3

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    I removed outlook, and reinstalled it.
    I think I know what the problem was, but I am not sure.
    Because I need to develop with VB and MS office, and can have customers with different versions of Office, both Office97 and Office 2000 is installed on my machine.
    Unfortunately, the admin installed them in the wrong order.
    He first installed Office 2000, and then Office 97.
    If you ever need both versions on the same machine, I advise you to install them in the order they appeared, so first office 97 and then Office 2000 (or later).

    This is already problem number 4 or so, that was caused by the wrong order of installations.

    After reinstalling Outlook the expected behaviour was back; outlook came with a question if I wanted to allow the other program to access my address list. This is acceptable to me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width