private void ClearDistributionLists() { DistLists.Clear(); Folder parentFolder = ListsFolder.Parent; string name = ListsFolder.Name; ListsFolder.Delete(); ListsFolder = parentFolder.Folders.Add(name, OlDefaultFolders.olFolderContacts); ListsFolder.ShowAsOutlookAB = true; Properties.Settings.Default.ListsFolderPath = ListsFolder.FolderPath; Properties.Settings.Default.Save(); }
/// <summary> /// Deletes the custom calendar /// </summary> public void DeleteCustomCalendar() { if (_customCalendar == null) { return; } try { _customCalendar.Delete(); _customCalendar = null; } catch (Exception ex) { MessageBox.Show("The following error occurred: " + ex.Message); } }