以编程方式访问“脱机通讯簿”使用兑换

发布于 2024-08-21 21:30:06 字数 111 浏览 11 评论 0原文

如何使用 Redemption dll (C#) 访问“脱机通讯簿”(从配置到 Exchange 计算机的 Exchange 服务器/Outlook)。

我正在寻找一些示例代码来继续我的任务。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

山有枢 2024-08-28 21:30:06

试试这个。我用的是救赎4.6。我创建了一个表单并添加了一个 DataGridView 以用于查看结果。这是我的代码:

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;
    }


}
}

结果将是这样的:
替代文本

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

居里长安 2024-08-28 21:30:06

抱歉,这不是一个很好的答案,但我会向 Dmitry Streblechenko(救赎库的开发者)发送一封电子邮件 - 他总是快速回复并且非常有帮助。

他的电子邮件地址位于兑换网站上:http://www.dimastr.com/redemption/

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/

夜唯美灬不弃 2024-08-28 21:30:06

如果您的问题更具体一些,将会很有帮助。

“脱机通讯簿”由 Outlook 自动管理,作为 Exchange 全局地址列表的缓存副本,请参阅 知识库文章

如果您需要访问地址簿的元素,请使用 Redemption 中的 SafeContact 对象。 Oulook 缓存联系信息的事实对用户来说应该是透明的。

关于脱机通讯簿,Outlook 用户界面中无需进行太多操作。您的问题是否意味着以编程方式触发地址簿的更新?就像在 Outlook 2010 中的“发送/接收”选项卡中的“发送和接收”一样。接收组、发送/接收组下拉列表、下载地址簿 ?

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 ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文