View Single Post
  #1  
Old July 6th 06, 03:59 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Remove Standard View in Outlook 2007?

I don't see a Delete method in the Object Browser for Outlook 2007 for Views
(or in earlier versions of Outlook either). At least here it's the Remove
method. If you're not sure about a method, property or event use the Object
Browser.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"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