Custom Contact View in Outlook 2000

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
 
S

Sue Mosher [MVP-Outlook]

Describe the steps that you followed and what you saw after you completed them.
 
J

Jim

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{}
}
 
S

Sue Mosher [MVP-Outlook]

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();
 
S

Sue Mosher [MVP-Outlook]

Not in Outlook 2000.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top