0 votes
by (370 points)
edited by


I use the Rebex library to create outlook files for my application. Once the file is saved, I then use outlook to open the file and send it. I save the files using this command:

MailMessage.Save(InternalFileName, MailFormat.OutlookMsg)

Once I open the file in Outlook, whenever I add an attachment like an excel files or another .msg file and send it, the receiver are unable to open the attachment. I get the following message:

"The operation failed, an object cannot be found"

However if I add the same attachments using code, I am able to open the attachments. So the issue is only if I drag the attachments into the opened .msg file or attach it using the "Attach file" button.

Another hint, I can open the attachments after I added them, but once they are sent, they cannot be opened by the receiver. I also tested that when I create a new email in Outlook (not Rebex) the attachments work as expected.

I'm using outlook version 2107.

Do you have any idea what might be causing this?


by (138k points)
We'll try reproducing this and look into it!
by (370 points)
Hi Lukas,

Have you been able to look into this?
by (138k points)
We have not been able to reproduce this so far. Would it be possible for you to generate one of those problematic messages and mail it to support@rebex.net to determine whether the issue persists as well? Also, which server are you using with the Outlook client? That might play some role as well.
by (370 points)
I have sent an email to support with an attachment that displays this behaviour.
by (138k points)
We tried reproducing the issue in Outlook 2016 and Outlook 2019, because we have been unable to determine which version you mean by “outlook version 2107“. Unfortunately, both of these version could read the message we received without issues (and the same applies to messages created by us using the approach described).

Could you please clarify which version of Outlook you use?
Also, which server are you using with the Outlook client? That might play some role as well.

Additionally, please let us know which version of Rebex Secure Mail library you used to create the Outlook file. And if possible, please provide some sample code that creates MSG files with which you experience the issue.

1 Answer

0 votes
by (138k points)

Despite our effort, we had no luck reproducing the issue. We are not quite sure it's actually a Rebex issue at all. Are you able to reproduce it on Outlook installed on different machine running under a different user account?

Our administrators pointed out that the "The operation failed, an object cannot be found" error is actually a rather common Outlook issue, usually caused by data corruption. For example, see this article.