2

How to access "Offline Address Book" (from exchange server/outlook configured to exchange machine) using Redemption dll (C#).

I am looking for some sample code to proceed with my task.

2
  • Great - good luck. Did you have a question? Feb 21, 2010 at 4:29
  • The sad thing is that when I Google for a potential lead, this very question is the number 1 result.
    – Greg
    Feb 22, 2010 at 4:32

3 Answers 3

2
+100

Try this. I am using Redemption 4.6. I created a form and added a DataGridView for result viewing purpose. Here is my code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TestingJojoWinForms
{
public partial class frmRedemption : Form
{
    public frmRedemption()
    {
        InitializeComponent();
    }

    private void frmRedemption_Load(object sender, EventArgs e)
    {
        DataTable dtResult = new DataTable("Result");
        dtResult.Columns.Add("EntryID");
        dtResult.Columns.Add("FirstName");
        dtResult.Columns.Add("LastName");
        dtResult.Columns.Add("Alias");
        dtResult.Columns.Add("SMTPAddress");
        dtResult.Columns.Add("JobTitle");
        dtResult.Columns.Add("Address");
        dtResult.Columns.Add("StreetAddress");

        Redemption.RDOSessionClass session = new Redemption.RDOSessionClass();
        session.Logon(@"your_account_name", "your_password", false, false, 0, false);
        for(int index = 1; index <= session.AddressBook.GAL.AddressEntries.Count; index++) 
        {
            Redemption.RDOAddressEntryClass entry = (Redemption.RDOAddressEntryClass)session.AddressBook.GAL.AddressEntries.Item(index);
            dtResult.Rows.Add(entry.EntryID, entry.FirstName, entry.LastName, entry.Alias, entry.SMTPAddress, entry.JobTitle, entry.Address, entry.StreetAddress);
        }
        session.Logoff();

        this.dataGridView1.DataSource = dtResult;
    }


}
}

The result will be like this: alt text

0
0

Sorry it's not much of an answer but I'd drop Dmitry Streblechenko (the developer of the Redemption library) an email - he's always been quick to respond and very helpful.

His email address is on the Redemption website: http://www.dimastr.com/redemption/

0

It would be helpful to be more specific in your question.

The "offline address book" is automatically managed by Outlook as a cached copy of the Global Address list of Exchange, see KB article.

If you need access to an element of the address book, use the SafeContact object from Redemption. The fact that Oulook cached the contact information should be transparent to the user.

There is not much to be done in the UI of Outlook regarding the offline address book. Does your question mean to programmatically trigger an update of the address book ? Like, in Outlook 2010, in the Send/Receive tab, Send & Receive group, Send/Receive Groups drop-down, download address book ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.