選択した会議に関するすべての情報を取得し、この情報を社内ポータルにプッシュする小さな Outlook アドインを開発しています。RequiredAttendees 部分を除いて実装は完了です。理由はわかりませんが、Interop.Outlook.AppointmentItemオブジェクトは出席者のフル ネーム (文字列) のみを返します。出席者のメールアドレスの方が気になります。問題を再現するための私のコードスニペットは次のとおりです。
try
{
AppointmentItem appointment = null;
for (int i = 1; i < Globals.ThisAddIn.Application.ActiveExplorer().Selection.Count + 1; i++)
{
Object currentSelected = Globals.ThisAddIn.Application.ActiveExplorer().Selection[i];
if (currentSelected is AppointmentItem)
{
appointment = currentSelected as AppointmentItem;
}
}
// I am only getting attendees full name here
string requiredAttendees = appointment.RequiredAttendees;
}
catch (System.Exception ex)
{
LogException(ex);
}
RequiredAttendees プロパティがMicrosoft.Office.Interop.Outlook._AppointmentItemインターフェイスで文字列として定義されていることがわかります。
//
// Summary:
// Returns a semicolon-delimited String (string in C#) of required attendee
// names for the meeting appointment. Read/write.
[DispId(3588)]
string RequiredAttendees { get; set; }
誰かがこの問題を解決するのを手伝ってくれたり、出席者の電子メール アドレスを取得する方法を教えてくれたりしたら、とてもありがたいです。
ありがとう。