You receive an error message or an incorrect count of open documents when you run a VBA macro in Office 2003 (821079)
The information in this article applies to:
- Microsoft Office 2003, All Editions, when used with:
- the operating system: Microsoft Windows Server 2003
- Microsoft Visual Basic for Applications 6.0, when used with:
- the operating system: Microsoft Windows Server 2003
SYMPTOMSWhen you run a Microsoft Visual Basic for Applications (VBA) macro in a Microsoft Office 2003 program, you may receive a "command not available" error message or the VBA macro may return an incorrect count of open documents. For example, this problem may occur when you type one of the following in the Immediate window of the Visual Basic Editor: - ?ActiveDocument.Permission.Count
- ?Application.Documents.Count
If you type ?ActiveDocument.Permission.Count, and then press ENTER, you may receive the following error message: Run-time error 4248: The command is not available because no document is open. Alternatively, if you type ?Application.Documents.Count, and then press ENTER, you may receive an incorrect count of open documents. CAUSEThis problem may occur if you have an information rights management document open and a non-information rights management document open in the Microsoft Office 2003 program at the same time.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 1/11/2006 |
---|
Keywords: | KbVBA kbmacro kbProgramming kberrmsg kbprb KB821079 kbAudEndUser kbAudDeveloper |
---|
|