Word application quit ambiguity

  • Thread starter Thread starter Alan T
  • Start date Start date
A

Alan T

I tried to close the word document object and word application:
private Interop.Word.Application WordApp;
private Interop.Word.Document WordDoc;

// close word and quit word application

WordDoc.Close(ref _newMissing, ref _newMissing, ref _newMissing);
WordApp.Application.Quit(ref _notTrue,
ref _newMissing,
ref _newMissing);



However, I got warning from VS 2005:

Warning 38 Ambiguity between method 'Interop.Word._Document.Close(ref
object, ref object, ref object)' and non-method
'Interop.Word.DocumentEvents2_Event.Close'. Using method group.

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

Not sure how to fix that ?
 
Back
Top