'Issue in opening a word document(.doc- Microsoft word 97- 2003 document) which is trying to connect with some network drive while opening
We are trying to convert a .doc file to .docx using c# code. Now, while opening the MS word application, the .doc file is taking more than 20 mins to open as it trying to connect to some network path to find some template.
Is there any way we can open that .doc file without letting it connect with network drive using Microsoft technologies.enter image description here
Solution 1:[1]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.
Instead, you may consider using any third-party components designed for the server-side execution. The Open XML SDK can be considered if you deal with open XML documents only, see Welcome to the Open XML SDK 2.5 for Office for more information.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Eugene Astafiev |
