Word 2000 documents opened or created with the Visible:=False parameter can't be made visible again, and/or don't trigger a Close Event

Article contributed by Dave Rado

The bug (described below) relating to opening documents was fixed in Word 2000 SR-1. The similar bug (also described below) relating to creating new documents has not yet been fixed, although Microsoft is working on it.

Problems with creating new documents invisibly

In Word 2000, if you create a document as follows:

Dim oDoc As Document
Set oDoc = Documents.Add(Template:=Options.DefaultFilePath(wdUserTemplatesPath) _
  & "\Temp.dot", Visible:=False)

... and later want it make the document visible again, using:

oDoc.Windows(1).Visible = True

you will get the error The requested member of the collection doesn't exist!

Even the following:

Dim oWin As Window
For Each oWin In Windows
    oWin.Visible = True
Next

... doesn't work – invisible windows which are made invisible by using Documents.Add(Visible:=False) don't form part of the Application.Windows collection. However:

oDoc.ActiveWindow.Visible = True

does work! But there is a secondary bug. If the user subsequently closes the document thus created, no close event is fired, so any AutoClose macro or Document_Close or DocumentChange event won't run. At time of writing there seems to be no known fix to the secondary bug.

Problems with opening documents invisibly

The following articles refer to a similar bug with using:

Documents.Open(Visible:=False)

which, as the articles state, was fixed in Word 2000 Service Release 1.

Q22054
Q209160
Q220392
Q220420