P
Pau Larsen
Hi,
I am trying to automat Word 2003 SP1 from a C# application.
When instantiating Word I am getting an error saying: “the specified module
could not be found".
I have added the Microsoft Word Object Library as a reference for my project
and set the following include statement: “using Word =
Microsoft.Office.Interop.Word;â€.
I have tried two different approaches to get the Word instance. Both found
on the internet from working examples:
From http://blogs.msdn.com/duncanma/archive/2003/05/11/6862.aspx:
-------------------------
Word.ApplicationClass oWord = new Word.ApplicationClass();
-------------------------
From http://support.microsoft.com/kb/316384/EN-US/:
-------------------------
Word._Application oWord;
oWord = new Word.Application();
-------------------------
Everything compiles fine but in both cases the error occurs in the line of
code trying to create the Word instance.
I have been searching the web like crazy without finding any useful info. I
have tried to lower my macro security settings but that did not change a
thing (I did not really expect that anyway).
Any suggestions for what to try are very welcome.
/Pau Larsen
I am trying to automat Word 2003 SP1 from a C# application.
When instantiating Word I am getting an error saying: “the specified module
could not be found".
I have added the Microsoft Word Object Library as a reference for my project
and set the following include statement: “using Word =
Microsoft.Office.Interop.Word;â€.
I have tried two different approaches to get the Word instance. Both found
on the internet from working examples:
From http://blogs.msdn.com/duncanma/archive/2003/05/11/6862.aspx:
-------------------------
Word.ApplicationClass oWord = new Word.ApplicationClass();
-------------------------
From http://support.microsoft.com/kb/316384/EN-US/:
-------------------------
Word._Application oWord;
oWord = new Word.Application();
-------------------------
Everything compiles fine but in both cases the error occurs in the line of
code trying to create the Word instance.
I have been searching the web like crazy without finding any useful info. I
have tried to lower my macro security settings but that did not change a
thing (I did not really expect that anyway).
Any suggestions for what to try are very welcome.
/Pau Larsen