Custom Contact View in Outlook 2000

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I create a custom view in contacts just fine with outlook 2003 and
Outlook 2002, but when I try to do the same thing in Outlook 2000 I
cannot do it.
Any ideas???
Thanks
 
Describe the steps that you followed and what you saw after you completed them.
 
ns = this.OutlookApplication.GetNamespace("MAPI");
contactFolder = ns.GetDefaultFolder(OlDefaultFolders.olFolderContacts);
contacts = contactFolder.Items;
Outlook.View myView = null;
Outlook.View currentView = null;
try
{
//save current view for later
currentView = contactFolder.CurrentView; //CURRENTVIEW IS NULL
myView = contactFolder.Views.Add("My View", OlViewType.olTableView,
OlViewSaveOption.olViewSaveOptionThisFolderOnlyMe);

}
catch(System.Exception ex)
{
try
{
myView = contactFolder.Views["My View"]; //BLOWS OUT HERE
myView.Reset();

}
catch{}
}
 
Outlook 2002 is the first version to support creation of views programmatically.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



{
myView = contactFolder.Views["My View"]; //BLOWS OUT HERE
myView.Reset();
 
Not in Outlook 2000.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top