如何创建可以选择多个联系人文件夹的Outlook 2007外接程序? [英] How to Create an Outlook 2007 AddIn that can select multiple contact folders?

查看:145
本文介绍了如何创建可以选择多个联系人文件夹的Outlook 2007外接程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用Visual Studio 2010 C#开发Outlook 2007加载项.目标是能够选择多个联系人文件夹,并且每个文件夹中都有多个联系人.

在下面的示例中,
http://98.130.241.249/project/img/02.jpg [
但是,如果我只用鼠标单击/选择Agency-WEST联系人文件夹,则单击时将看不到要联系的新消息".

我要在AddIn中执行的操作是首先能够选择/单击一个联系人文件夹,然后单击向联系人发送新消息"按钮,然后该联系人文件夹中的所有联系人项目的电子邮件地址将显示在到消息"窗口的部分.

之后,第二步是可以通过按住Ctrl键选择多个联系人文件夹,然后单击新建要联系的邮件"按钮,然后所有选中的联系人文件夹的电子邮件地址将显示在消息"窗口的收件人"部分.

据我了解,我不能选择多个文件夹.

Hi All,

I am developing an Outlook 2007 Add-In using Visual Studio 2010, C#. The goal is to be able to select multiple contact folders, and each folder has multiple contacts within.

In the example below,
http://98.130.241.249/project/img/02.jpg[^]

I have two contact folders: Agency-WEST and Agency-EAST. Both contact folders have multiple contact items within.
Right now, if I want to send an e-mail to all people in my both contact folders, I have to go to the Agency-WEST folder first, select all contact items, then click the "New Message to Contact button" to have their email addresses appear in the To section of the Message window.

However, if I just use my mouse to click/select the Agency-WEST contact folder, the "New Message to Contact" won''t be visible to click.

What I would like to do in my AddIn is to first be able to select/click one contact folder, then click the "New Message to Contact" button, then all contact items'' email addresses inside that contact folder will be displayed onto the To section of the Message window.

After that, the second step is to be able to select more than one contact folders by holding down the Ctrl button, then click the "New Message to Contact" button, then all selected contact folders'' e-mail addresses will be displayed onto the To section of the Message window.

From my understanding is that I cannot select more than 1 folder. Is there any alternatives to work this around?

推荐答案

选择所有文件夹"是什么意思?如果没有,您可以提供用例吗?

如果要访问所有文件夹和其他选定为地址源的源,请使用NameSpace.AddressLists.每个枚举都会产生一个包含联系人的AddressList.

请参阅
http://msdn.microsoft.com/en-us/library/aa210893(v = office.11​​).aspx [
What do you mean "select ALL folders"? If not, can you provide a use case?

If you want to have access to all folders and other sources selected as address sources, use NameSpace.AddressLists. Each enumeration yields an AddressList which contain contacts.

See http://msdn.microsoft.com/en-us/library/aa210893(v=office.11).aspx[^] for pointers.


这篇关于如何创建可以选择多个联系人文件夹的Outlook 2007外接程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆