Results 1 to 3 of 3

Thread: *RESOLVED* CDO 1.21 problems after security update

Threaded View

  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.

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