I'm just learning to program MS Word from VB.NET and getting errors when I try to call the quit command. Can someone help? I'm following the examples in the book Mastering Visual Basic .NET. I'm doing this:
Dim WordApp As New Word.Application()
Dim newDoc As New Word.Document()
newDoc = WordApp.Documents.Add
newDoc.SaveAs("MyVBWordDoc"
...do stuff....
WordApp.Documents.Close(Word.WdSaveOptions.wdDoNotSaveChanges)
WordApp.Quit()
I get a compiler error over the WordApp.Quit() saying:
"Quit is ambiguous across the inherited interfaces 'Word._Application'and
'Word.ApplicationEvents2_Event'"
What does that mean and what should I do about it? I'm a little miffed because I'm just following the example code out of the book and it's not working.
Thanks for any help,
Bryan
Dim WordApp As New Word.Application()
Dim newDoc As New Word.Document()
newDoc = WordApp.Documents.Add
newDoc.SaveAs("MyVBWordDoc"
...do stuff....
WordApp.Documents.Close(Word.WdSaveOptions.wdDoNotSaveChanges)
WordApp.Quit()
I get a compiler error over the WordApp.Quit() saying:
"Quit is ambiguous across the inherited interfaces 'Word._Application'and
'Word.ApplicationEvents2_Event'"
What does that mean and what should I do about it? I'm a little miffed because I'm just following the example code out of the book and it's not working.
Thanks for any help,
Bryan