Article ID: 220504 - Last Review: June 17, 2005 - Revision: 2.0 WD2000: Documents/Windows Collection Fails to Include Hidden DocumentsThis article was previously published under Q220504 SYMPTOMS
When you use the Visible property of the Open method for the Documents collection to open an existing document as hidden, the document count and the window count are not incremented. For example, the following Visual Basic for Applications procedure demonstrates this problem: Furthermore, you cannot make visible a document you open as hidden using the ActiveWindow.Visible command. Attempting to do so may result in the following error message:
Run-time error '91': Object variable or With block variable not set.
Run-time error '4248': This command is not available because no documents are opened.
RESOLUTION
To resolve this problem, obtain Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a).
To obtain SR-1/SR-1a, click the article number below to view the article in the Microsoft Knowledge Base: 245025
(http://support.microsoft.com/kb/245025/EN-US/
)
OFF2000: How to Obtain and Install Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a)
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To temporarily work around this problem, you can treat the hidden document, for opening and referencing, as a separate document object. The following Visual Basic for applications procedure demonstrates this work around: STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem was corrected in Microsoft Office 2000 SR-1/SR-1a.
MORE INFORMATIONFor more information about the Documents collection, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type Documents collection in the Office Assistant or the Answer Wizard, and then click Search to view the topic. For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base: 212536
(http://support.microsoft.com/kb/212536/EN-US/
)
OFF2000: How to Run Sample Code from Knowledge Base Articles
| Article Translations
|
Back to the top
