Quit method call to a Word object returns ambiguous Error in VB.Net 
Author Message
 Quit method call to a Word object returns ambiguous Error in VB.Net

Hi,

I am trying to open a Word 2000 Application using VB.net.

I am doing a early bind of the Word.Application object. Everything
seems fine but i am not able to close the instance of the word object.

When i give
oWordApp.Quit()

it returns me with a error stating 'Quit' is ambiguous across the
inherited interfaces "Word._Application" and
"Word.ApplicationEvents2_Event".

Can anyone tell me where i am going wrong.

Thanks
Shirish



Sun, 06 Feb 2005 00:54:34 GMT  
 Quit method call to a Word object returns ambiguous Error in VB.Net
Try this:

'Open a Word doc
Dim MyWordApp As New Word.Application()

'Close a Word doc
CType(MyWordApp, Word._Application).Quit()

Cheers

--
Robert Chapman
Manager, Applications Development
prairieFyre Software Inc.
http://www.prairiefyre.com

Quote:
> Hi,

> I am trying to open a Word 2000 Application using VB.net.

> I am doing a early bind of the Word.Application object. Everything
> seems fine but i am not able to close the instance of the word object.

> When i give
> oWordApp.Quit()

> it returns me with a error stating 'Quit' is ambiguous across the
> inherited interfaces "Word._Application" and
> "Word.ApplicationEvents2_Event".

> Can anyone tell me where i am going wrong.

> Thanks
> Shirish



Sun, 06 Feb 2005 01:04:28 GMT  
 Quit method call to a Word object returns ambiguous Error in VB.Net
Shirish,

BUG: Visual Basic .NET "'[Method]' is ambiguous across the inherited
interfaces" Error Message When Using Office Automation
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315981

Mattias

===
Mattias Sj?gren (VB MVP)

http://www.msjogren.net/dotnet/



Sun, 06 Feb 2005 01:15:48 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. -2147023170 Automation error on quit method of Word object

2. Word XP and .NET NewDocument event ambiguous error

3. VB.Net using a Word doc object - copying in text w/ a hard return

4. Calling LogonUser from .Net returns error code 126.

5. accessing word document through vb.net using word com object

6. CreateObject returns error 429 and then crashes Word on second call

7. Excel Application isn't released from memory after Quit method called

8. Quit method causes crash called from automation

9. permission denied error when trying to call send method of NewMail object

10. Out of Memory error with Application.Quit method

11. Extending Word - add new method which can be called from VB

12. extending Word - new method to be called from VB

 

 
Powered by phpBB® Forum Software