secureshell
Programmer
Hi,
I am referencing the MS Word 11.0 Object Library v8.3 (COM) in my VB.NET project. Basically I am using word automation to prefill some word documents with data. All the members exposed by the Word object seem to work fine except for the "Quit" method that raises the following compile error if I call it anywhere in code:
Code:
Dim objWordApp as Word.Application
objWordApp = new Word.Application
....(code)
....(code)
....(code)
objWordApp.Quit
Error:
'Quit' is ambiguous across the inherited interfaces 'Word._Application' and 'Word.ApplicationEvents4_Event'.
If I don't use the Quit method, then the WINWORD.EXE process stays in memory after my application unloads and I don't want this.
Does anyone know the reason for this? Apparently, the Quit method for the same Word object functions as expected from VB6 code, so I am assuming this is due to the Managed/Unmanaged code interaction. Any suggestions would be great. TIA
secureshell
{W r i t e C o d e A n d K i c k A s s}
I am referencing the MS Word 11.0 Object Library v8.3 (COM) in my VB.NET project. Basically I am using word automation to prefill some word documents with data. All the members exposed by the Word object seem to work fine except for the "Quit" method that raises the following compile error if I call it anywhere in code:
Code:
Dim objWordApp as Word.Application
objWordApp = new Word.Application
....(code)
....(code)
....(code)
objWordApp.Quit
Error:
'Quit' is ambiguous across the inherited interfaces 'Word._Application' and 'Word.ApplicationEvents4_Event'.
If I don't use the Quit method, then the WINWORD.EXE process stays in memory after my application unloads and I don't want this.
Does anyone know the reason for this? Apparently, the Quit method for the same Word object functions as expected from VB6 code, so I am assuming this is due to the Managed/Unmanaged code interaction. Any suggestions would be great. TIA
secureshell
{W r i t e C o d e A n d K i c k A s s}