다른 Outlook 일정표에서 일부 일정을 읽은 다음 큰 화면으로 표시하려고합니다. 내 컴퓨터에서 모든 것이 잘 작동하지만 (Outlook 2010, Win7 x64), 클라이언트의 PC (Outlook2003, Win XP)에서는 프로그램이 모든 약속을 찾지 못합니다. 도구를 디버깅 할 수있는 확인란을 추가하면 8과 12 사이의 약속 (12 개가 있어야 함)과 항상 6이 없습니다. 어떤 문제인지 잘 모릅니다. 그래서 나를 도와주세요. 나는 몇 가지 새로운 정보가Outlook Interop이 다른 결과를 제공합니다.
this.Appointments = new List<AppointmentItem>();
foreach (MAPIFolder folder in this.SelectedCalendars)
{
foreach (object app in folder.Items)
{
if (app is AppointmentItem && ((AppointmentItem)app).Start.Date == DateTime.Now.Date)
{
this.Appointments.Add(((AppointmentItem)app));
}
}
}
this.Appointments.Sort(
delegate(AppointmentItem App1, AppointmentItem App2)
{
return App1.Start.CompareTo(App2.Start);
});
업데이트
:
여기에 코드입니다. 이 예외가 있습니다. 어떤 생각을 어떻게 처리 할까?
The COM-Object of the type "System.__ComObject" couldn't be changed to the Interfacetype "Microsoft.Office.Interop.AppointmentItem. This procedure couldn't be run, because the Queryinterface-Call to the COM-Component for the interface with IID "{00063033-0000-0000-C000-000000000046}" couldn't be run because of the following error: Interface not supported (Exception _HRESULT:0x80004002 (E_NOINTERFACE)).
소리가 좋습니다. 나는 그것을 시도 할 것이다! 1-2 일 걸릴 수 ... –
흠,하지만,이 문제를 해결할 수 없습니다. Outlook/Exchange에서 문제가 될 수 있다고 생각하기 시작합니다. –
2003 년과 2010 년에 folder.Items.Count가 같은 번호를 사용합니까? –