0

I am currently using GetRDOObjectFromOutlookObject to get the RDOAttachment object from outlook attachment. Although I could successfully use the object for the functionality I needed to achieve. Once the mail item is sent , outlook triggers a save and there I have conflicting issue that causes the outlook repair tool error. I realized that this happens when two copies of the same message is opened, Outlook fails to save the mail and throws the error. How do I overcome this issue?

            foreach (Outlook.Attachment at in mail.MailItem.Attachments)
            {
                Redemption.IRDOAttachment rDOAttachment;
                rDOAttachment = Globals.ThisAddIn.session.GetRDOObjectFromOutlookObject(at);
                rDOAttachment.DisplayName = at.DisplayName;

Is this a bug in redemption or am I missing something here?

amrutha
  • 11
  • 2
  • Are you getting a conflict message (which is expected since you are modifying two instances of the same object independently) or is it actual corruption that requires you to run scanpst.exe? – Dmitry Streblechenko Mar 22 '21 at 16:24
  • I'm getting the error :"Errors have been detected :file path," message box with run repair tool button. – amrutha Mar 23 '21 at 16:48
  • Have you tried to use GetRDOObjectFromOutlookObject against the parent MailItem rather than an attachment? – Dmitry Streblechenko Mar 23 '21 at 18:05

1 Answers1

0

I used the below code by getting RDOAttachments from RDOMail rather than GetRDOObjectFromOutlookObject.

RDOMail msg = Globals.ThisAddIn.session.GetMessageFromID(redemptionMailItem.Item.EntryID); RDOAttachments redemptionAttachments = msg.Attachments;

This solved the issue, But having said that there is a bug GetRDOObjectFromOutlookObject, that makes it unreliable to use it.

amrutha
  • 11
  • 2