When 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.