Get error opening word document using Word Interop C#

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
System.AccessViolationException was unhandled<br/>   Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."<br/>   Source="Microsoft.Office.Interop.Word"<br/>   StackTrace:<br/>        at Microsoft.Office.Interop.Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)<br/>        at WordApplication.CCWordApp.Open(String strFileName) in C:WPFRGOTestsWpfApplication1WordClass.cs:line 32<br/>        at WpfApplication1.App..ctor() in C:WPFRGOTestsWpfApplication1App.xaml.cs:line 18<br/>        at WpfApplication1.App.Main() in C:WPFRGOTestsWpfApplication1objDebugApp.g.cs:line 47<br/>        at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)<br/>        at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)<br/>        at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()<br/>        at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br/>        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br/>        at System.Threading.ThreadHelper.ThreadStart()<br/>   InnerException: <br/>

View the full article
 
Back
Top