Have a look at this:
http://support.microsoft.com/default...b;EN-US;317109
you might want to follow the instructions in the article..
You can try calling ReleaseComObject in a loop till the reference count hits
zero:
Do While System.Runtime.InteropServices.ReleaseComObject() <> 0
Loop
hope that helps..
Imran.
"Bronislav" <(E-Mail Removed)> wrote in message
news:A3F8485A-88C1-487F-9BC9-(E-Mail Removed)...
> Thank you, but MS Word still stays open. All documents are closing
properly.
> Thanks again.
>
> "Herfried K. Wagner [MVP]" wrote:
>
> > "Bronislav" <(E-Mail Removed)> schrieb:
> > > Friend Shared WithEvents WordApp As New Word.Application()
> > > And it works fine
> > > When I'm living an application I try to close MS Word
> > > WordApp.Documents.Close(Word.WdSaveOptions.wdDoNotSaveChanges)
> > > WordApp.Quit(Word.WdSaveOptions.wdDoNotSaveChanges)
> > > WordApp = Nothing
> > > First Line works fine. Second line give error in the VB.Net 2002 and
do
> > > not
> > > give error in the VB.NET 2003 but MS WORD state open. If I open the
> > > application again a second instance of the MS Word will be opened and
so
> > > on.
> >
> > Call 'System.Runtime.InteropServices.Marshal.ReleaseComObject' on each
COM
> > object ('WordApp', document objects, ...).
> >
> > --
> > M S Herfried K. Wagner
> > M V P <URL:http://dotnet.mvps.org/>
> > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
> >
> >