View Single Post
  #2  
Old July 28th 09, 09:27 AM posted to microsoft.public.developer.outlook.addins,microsoft.public.outlook.interop,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba,microsoft.public.platformsdk.mapi
escamoteur
external usenet poster
 
Posts: 147
Default How do I change the display name of a .pst store

I tried to change the display name of a newly added .pst store

theApp.Instance.Application.Session.AddStoreEx(pat h,Microsoft.Office.Interop.Outlook.OlStoreType.olS toreUnicode);
//Find Our Store with WorkAround over FilePath
Outlook.Stores stores=theApp.Instance.Application.Session.Stores;
foreach (Outlook.Store store in stores)
{
if (store.FilePath== path)
{
AO_Store = store;
string /mapi/proptag/0x3001001F";
Outlook.PropertyAccessor oPA=store.PropertyAccessor;
try
{
oPA.SetProperty(PR_DISPLAY_NAME,"ArtistsOrganizer" );
}
catch (Exception e)
{
Debug.WriteLine(e.Message);
}
}
}

But I get an access denied exception when I run this.

All the bestTom
Ads