3

I have made an outlook add-in that saves e-mails to a document folder through

mailItem.SaveAs(@"\\\mysite\mylist\randomnumber.msg").

Sometimes, the email doesn't get saved, and show below error.

Error:The operation failed.

If I open a windows explorer to \\mysite\mylist\, then all subsequent emails are saved.

This is a very peculiar issue!!

My workaround is to 'forcibly' open a connection to Sharepoint and if there's an error, well deal with it manually:

string[] ss = Directory.GetFiles('\\mysite\mylist\');

and if it doesn't work:

Process.Start('\\mysite\mylist\');

So, I wonder if someone has come up with that issue and other workarounds.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.