Alan T said:
private Interop.Word.Application _wordApp;
What is the differences betwenn
_wordApp.Quit(...)
and _wordApp.Application.Quit(...) ?
Don't know where you get _wordApp.Application from, IMO this is not possible, here :
private Interop.Word.Application _wordApp;
you declare a variable _wordApp to be of type Interop.Word.Application.
and here:
_wordApp.Application.Quit(...)
you call Quit on what actually should look like
Interop.Word.Application.Application.Quit(..)
but there is no such class (or interface) Interop.Word.Application.Application
As I told you in another thread, Application refers to an interface, and ApplicationClass
refers to the class implementing Application. You should set the variable to
ApplicationClass like this:
private Interop.Word.ApplicationClass _wordApp;
....
_wordApp = new Interop.Word.ApplicationClass();
....
_wordApp.Quit(...);
Note that I also don't get where you got this "Interop.Word" from, the importer should
generate "Microsoft.Office.Interop.Word" as namespace. Wonder where you got the interop
assembly from.
Willy.