Discussion:
Microsoft.Office.Interop.Word.Application questions
(too old to reply)
AAaron123
2008-05-17 01:10:52 UTC
Permalink
Raw Message
The instructions below produce the error shown.

Why is it even considering ApplicationEvents4_Event

rather than Application?



Microsoft.Office.Interop.Word.Application WordApp =

new Microsoft.Office.Interop.Word.Application();



private object emptyItem = System.Reflection.Missing.Value;

private object oFalse = false;



WordApp.Quit(ref oFalse, ref emptyItem, ref emptyItem);


Warning 1 Ambiguity between method
'Microsoft.Office.Interop.Word._Application.Quit(ref object, ref object, ref
object)' and non-method
'Microsoft.Office.Interop.Word.ApplicationEvents4_Event.Quit'. Using method
group.

======

Also, I can't find the reference that goes with the following:

using Microsoft.Office.Core;



=======

Can you explain what is going on?



Thanks
Vic Berry
2010-09-19 00:01:46 UTC
Permalink
Raw Message
There is a great answer to this question at the following link
http://support.microsoft.com/kb/315981

> On Friday, May 16, 2008 9:10 PM AAaron123 wrote:

> The instructions below produce the error shown.
>
> Why is it even considering ApplicationEvents4_Event
>
> rather than Application?
>
>
>
> Microsoft.Office.Interop.Word.Application WordApp =
>
> new Microsoft.Office.Interop.Word.Application();
>
>
>
> private object emptyItem = System.Reflection.Missing.Value;
>
> private object oFalse = false;
>
>
>
> WordApp.Quit(ref oFalse, ref emptyItem, ref emptyItem);
>
>
> Warning 1 Ambiguity between method
> 'Microsoft.Office.Interop.Word._Application.Quit(ref object, ref object, ref
> object)' and non-method
> 'Microsoft.Office.Interop.Word.ApplicationEvents4_Event.Quit'. Using method
> group.
>
> ======
>
> Also, I can't find the reference that goes with the following:
>
> using Microsoft.Office.Core;
>
>
>
> =======
>
> Can you explain what is going on?
>
>
>
> Thanks


> Submitted via EggHeadCafe - Software Developer Portal of Choice
> Book Review: Excel 2010 - The Missing Manual [OReilly]
> http://www.eggheadcafe.com/tutorials/aspnet/7d211741-221d-46c7-b9c3-d34bf84568be/book-review-excel-2010--the-missing-manual-oreilly.aspx
Loading...