Click to See Complete Forum and Search --> : ActiveDocument.Close() ???


bratuha
May 29th, 2003, 07:42 AM
Hi All,

I'm trying to close an active word document using



Private WdApp As Word.Application
wdapp = new Word.Application

.....

wdapp.ActiveDocument.Close()



but i get the following error.

C:\HtmlHelp\HtmlHelp\Split.vb(125): 'Close' is ambiguous across the inherited interfaces 'Word._Document' and 'Word.DocumentEvents_Event'.

could some one tell me please how can i close the document.

Dozo_1st
June 2nd, 2003, 11:37 AM
This is a bug in VB.Net. :(

Use

Dim oWord As Word.ApplicationClass
Dim oDocument As Word.DocumentClass


And your problem is solved...:rolleyes:

D.