Мне нужно открыть элемент встречи Outlook с помощью кнопки на ленте.
var item = control.Context as Inspector;
AppointmentItem appointmentItem = item.CurrentItem as AppointmentItem;
if (appointmentItem != null)
{
if (appointmentItem.EntryID == null)
{
appointmentItem.Subject = "New Appointment";
appointmentItem.Body = "Welcome to new appointment";
}
}
Он должен открыть окно встречи, но выдает ошибку нулевой ссылки, как в этой строке кода «var item = control.Context as Inspector;» элемент равен нулю.