Get Storage from an out look folder in redemption

296 views Asked by At

I use following code in my project to Get Storage from an out look folder.

        internal static string TryToGetFolderProperty(Outlook.Folder f, string propName, string defaultVal)
        {
            try
            {
                Outlook.StorageItem si = f.GetStorage("Flow", Outlook.OlStorageIdentifierType.olIdentifyBySubject);
                Outlook.UserProperty up = si.UserProperties.Find(propName, true);

                if (up == null)
                    return defaultVal;

                return up.Value as string;
            }
            catch
            {
                return defaultVal;
            }
        }

I want to do the same using a Redemption folder instead of the existing outlook folder, like follows

internal static string TryToGetFolderProperty(RDOFolder f, string propName, string defaultVal)

But after changing the code, I realized that there are no any method to Get Storage from Redemption folder. Ex:- f.GetStorage. Do we have a way in redemption to do this? Please advice me.

1

There are 1 answers

0
Dmitry Streblechenko On BEST ANSWER

Hidden (associated) messages are not any different from regular messages on the MAPI level. Instead of exposing a Storage object, Redemption exposes hidden messages using the RDOFolder.HiddenItems property which returns the same RDOItems object returned by RDOFolder.Items.

RDOMail hiddenMessage = YourRDOFolder.HiddenItems.Find("Subject = 'Flow' ")