目前正在做一个OutLook方面的应用,需要通过地址获取该用户的所以信息,包括email ,phoneNo,company
等等.前面已经也好了也连接起来了,但是我现在主要的问题是不知道怎么获取他的其他信息,我办代码发
给你们看看:
main(){
Outlook.ApplicationClass outLookApp = new Outlook.ApplicationClass();
Outlook.NameSpace outlookNS = outLookApp.GetNamespace("MAPI"); Console.WriteLine("The CurrentUser name is {0}. ", outlookNS.CurrentUser.Name);
Console.WriteLine("-----------------------------------------");
Outlook.AddressEntry oM = outlookNS.CurrentUser.AddressEntry; //Console.WriteLine("The level {0} of {1}'s Manager name is {2}!\n", level, alias, oM.Name); // Get currentUser's manager's DirectReports.
Outlook.AddressEntries oD = oM.GetExchangeUser().GetDirectReports(); System.Console.WriteLine(k.Name);
// Get each currentUser's name in the manager's DirectReports.
foreach (Outlook.AddressEntry oA in oD)
{
// Get the full messages and store them.
System.Console.WriteLine(oA.Name);
}
名字是获取到了但是其他都无法获取,我要获取的内容是: 单击姓名右键 outlook属性栏中表格中的内容,如下图:
等等.前面已经也好了也连接起来了,但是我现在主要的问题是不知道怎么获取他的其他信息,我办代码发
给你们看看:
main(){
Outlook.ApplicationClass outLookApp = new Outlook.ApplicationClass();
Outlook.NameSpace outlookNS = outLookApp.GetNamespace("MAPI"); Console.WriteLine("The CurrentUser name is {0}. ", outlookNS.CurrentUser.Name);
Console.WriteLine("-----------------------------------------");
Outlook.AddressEntry oM = outlookNS.CurrentUser.AddressEntry; //Console.WriteLine("The level {0} of {1}'s Manager name is {2}!\n", level, alias, oM.Name); // Get currentUser's manager's DirectReports.
Outlook.AddressEntries oD = oM.GetExchangeUser().GetDirectReports(); System.Console.WriteLine(k.Name);
// Get each currentUser's name in the manager's DirectReports.
foreach (Outlook.AddressEntry oA in oD)
{
// Get the full messages and store them.
System.Console.WriteLine(oA.Name);
}
名字是获取到了但是其他都无法获取,我要获取的内容是: 单击姓名右键 outlook属性栏中表格中的内容,如下图:
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货