From 3f1d5f3570155d4c271af3589fb63d99475b89ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20D=C3=A4schler?= Date: Sun, 24 Mar 2019 19:52:55 +0100 Subject: [PATCH] Now all appointments in mailbox are taken into account --- Outlook2013TodoAddIn/AppointmentsControl.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Outlook2013TodoAddIn/AppointmentsControl.cs b/Outlook2013TodoAddIn/AppointmentsControl.cs index 249e673..f091e9a 100644 --- a/Outlook2013TodoAddIn/AppointmentsControl.cs +++ b/Outlook2013TodoAddIn/AppointmentsControl.cs @@ -263,8 +263,12 @@ namespace Outlook2013TodoAddIn { if (Properties.Settings.Default.Accounts != null && Properties.Settings.Default.Accounts.Contains(store.DisplayName)) { - Outlook.Folder calFolder = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar) as Outlook.Folder; - appts.AddRange(this.RetrieveAppointmentsForFolder(calFolder)); + Outlook.Folders rootFolders = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar).Parent.Folders as Outlook.Folders; + foreach (Outlook.Folder folder in rootFolders) + { + appts.AddRange(this.RetrieveAppointmentsForFolder(folder)); + } + // TODO: Shared calendars? } }