View Single Post
  #2  
Old July 6th 06, 01:11 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Remove Standard View in Outlook 2007?

It is not possible to remove any of the standard views in any version of Outlook. What about setting Folder.CustomViewsOnly = True instead?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Fidget Brain" wrote in message ...
i have created a custom MAPIFolder and would like to remove some of the
default views. I get a COM exception when I try this. Is this a bug in the
Beta code or is it just not possible?

here is my code:

Outlook.Folder contactsFolder = (Outlook.Folder)
this.Application.GetNamespace("MAPI").GetDefaultFo lder(Outlook.OlDefaultFolders.olFolderContacts);
Outlook.Folder myFolder = (Outlook.Folder) contactsFolder.Add("MyFolder",
System.Reflection.Missing.Value);
myFolder.Views["By Location"].Delete();


Ads