Using added account in VSTO Outlook add-in before restart

71 Views Asked by At

We are developing a VSTO Outlook add-in and need to get an added account on the same Outlook run, not after restart. In C# properties it is not available.

Using MAPI in C++ DLL we can get the accounts, but we also need StoreID. When we request the property using

hRes = lpAccount->GetProp(PROP_ACCT_DELIVERY_STORE, &pProp);

it does not get success before restart of Outlook. The other properties work normally. Maybe it is an issue with a kind of cache, but we did not find any cache update methods in Microsoft documentation. Thanks in advance!

0

There are 0 best solutions below