c# - Cannot create StorageItem in Outlook Add-In -
i'm trying run code:
this.storage = application.session.getdefaultfolder(outlook.oldefaultfolders.olfoldercontacts) .getstorage("ws_up_storage", outlook.olstorageidentifiertype.olidentifybymessageclass);
it runs on machines, on others throws exception:
i tried other folder names, olfolderinbox
, olfoldercalendar
. i've looked @ microsoft docs this, , says error expected if folder 1 of following:
- the folder microsoft exchange public folder, internet message access protocol (imap), msn hotmail, or microsoft sharepoint foundation folder.
- the user permission folder read-only.
- the store provider not support hidden items.
the sad fact is, not know how check 1 of these true , if it's @ possible.
how go determining cause of problem , addressing it?
the error 0x80040102 mapi_e_no_support, means store not support hidden (associated) items.
read pr_mdb_provider
property (dasl name http://schemas.microsoft.com/mapi/proptag/0x34140102
) using propertyaccessor.getproperty. returned 16 byte array specific each store kind. e.g. exchange store, pbexchangeproviderprimaryuserguid
(5494a1c0297f101ba58708002b2a2517). take @ object in store in question using outlookspy (click imessage, imapifolder, or imsgstore) see pr_mdb_provider
property.
Comments
Post a Comment