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 VisualBasic.NET as well as a Microsoft book on VB.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 blue squiggle under WordApp.Quit() with an error 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 blue squiggle under WordApp.Quit() with an error 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