从Visual Studio Word模板访问Outlook联系人

问题描述:

我正在尝试在visual studio 2012 / C#中创建一个Word模板,我想在其中单击一个按钮,该按钮读取MS字表(包含用户名)中的单元格并搜索outlook这个用户的全名,电话和电子邮件(如果存在),并将其发送到不同的单元格。



我将此添加到我的文档项目中:



Hi, I''m trying to make a Word template in visual studio 2012/C#, where I want to click a button which reads a cell in an MS word table (which contains a user name)and searches outlook for the Full name, phone and email for such user if it exists, and send it to different cells.

I added this to my document project:

using Word = Microsoft.Office.Interop.Word;
using Outlook = Microsoft.Office.Interop.Outlook;





我不知道如何获取我想在我的word文档中的各个单元格中显示的联系信息。请指教。



谢谢。



I''m not sure how to get the contact information that I want to display in various cells in my word document. Please advise.

Thanks.

这应该可以帮到你,



http://msdn.microsoft .com / zh-CN / library / ms269108(v = vs.80).aspx [ ^ ]
This should get you started,

http://msdn.microsoft.com/en-CA/library/ms269108(v=vs.80).aspx[^]