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
|