I wrote a little method to check if the file is locked by attempting to open the System.IO.FileInfo to a FileStream inside a try..catch that captures an IOException. If it opens, I close the FileStream and return a false. If it catches the IOException, I return a true. Works like a charm...
Actually, that is a practical idea. This project is an in-house windows app. If the file is locked by Outlook I could make a copy to a local temp directory and open the copy. Thanks for the idea.
Do happen to know how to check if an .msg file is locked by Outlook? Is there an attribute or...
I'm running Outlook 2010. I copy an email to a network folder and it saves correctly as an .msg file. I can open it fine. Close it. Open it again. This is not the common problem listed about opening the file, then closing, then not being able to open again. I get the below error when I try...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.