G
Guest
In the Main form of my application I declare
Friend Shared WithEvents WordApp As New Word.Application()
And it works fine
When I'm living an application I try to close MS Word
WordApp.Documents.Close(Word.WdSaveOptions.wdDoNotSaveChanges)
WordApp.Quit(Word.WdSaveOptions.wdDoNotSaveChanges)
WordApp = Nothing
First Line works fine. Second line give error in the VB.Net 2002 and do not
give error in the VB.NET 2003 but MS WORD state open. If I open the
application again a second instance of the MS Word will be opened and so on.
Can somebody tell me what wrong with this approach.
Thanks, Bronislav
Friend Shared WithEvents WordApp As New Word.Application()
And it works fine
When I'm living an application I try to close MS Word
WordApp.Documents.Close(Word.WdSaveOptions.wdDoNotSaveChanges)
WordApp.Quit(Word.WdSaveOptions.wdDoNotSaveChanges)
WordApp = Nothing
First Line works fine. Second line give error in the VB.Net 2002 and do not
give error in the VB.NET 2003 but MS WORD state open. If I open the
application again a second instance of the MS Word will be opened and so on.
Can somebody tell me what wrong with this approach.
Thanks, Bronislav