I m working on a outlook add in using Redemption, which has to move emails from my outlook inbox to a specified folder. It works fine until it is for the local mailbox. When i try to do the same on a shared mailbox,from my outlook it doesn't work. Meaning on my outlook i access the shared mailbox and try to move the mail from shared mailboxes "Inbox" to a folder in shared mailbox itself.
I use the below code for the same.
oTempFolder = oRDOSession.GetSharedMailbox("mailbox name")
It throws the below error: System.InvalidCastException: Unable to cast COM object of type 'Redemption.RDOStoreClass' to interface type 'Redemption.RDOFolder'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{15B8597F-0A55-4361-AE8B-1F690BC61EE4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
I tried putting the mailbox name and the mailbox address also, nothing helped.
I tried the below code, found here on stackoverflow itself
store = _session.Stores.GetSharedMailbox("Example shared mailbox ");
But it didn't make a difference.
Can someone please guide me into this?