Group: microsoft.public.word.vba.general
From: "Doug Robbins - Word MVP"
Date: Thursday, March 27, 2008 9:54 PM
Subject: Re: Closing single word window

If it's the active document, then use:

ActiveDocument.Close wdDoNotSaveChanges

If it is not the active document, then you need somewhere else in your code
to have declared a document object that you Set to the document that you
want to close.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kezza" wrote in message
news:E39D5E9F-58C1-45A7-AF36-4B0F358E2CF4@microsoft.com...
> Hi There
> I am trying to work out how to close a single word window without closing
> any other word windows that might be open.
>
> I can close the document and I can close all the word windows and I can
> close the window if there are other word windows open.
>
> I have tried the following
> Me.Application.ActiveWindow.Close
> Windows("conquest report.doc").Parent.Close
> SaveChanges:=wdDoNotSaveChanges
>
> Windows("A.doc").Application.Quit
>
> Non of this code gives me the solution I am looking for.
>
> I would really appreciate some assistance.
>
> Thanks


Safety Articles | Usenet Groups | Usenet News | Bluegrass