MAPIのAppointmentItemにTimezoneを追加

csharpiconMAPIでAppointmentを作る場合にTimeZoneの指定をする時のメモ。TimeZoneの元オブジェクトはApplication下にあるTimeZonesコレクションから参照する。
Using Outlook = Microsoft.Office.Interop.Outlook;

Outlook.Application app = new outlook.Application();
Outlook.AppointmentItem apoItem = app.CreateItem(Outlook.OlItemType.olAppointmentItem) as Outlook.AppointmentItem;
Outlook.TimeZones tzs = app.TimeZones;
apoItem.StartTimeZone = tzs["Tokyo Standard Time"];
くわしくはHow to: Create an Appointment That Starts in the Pacific Time Zone and Ends in the Eastern Time Zoneを参照。