The information in this article applies to:
SUMMARY
When you run a WordBasic macro, it may generate the error message,
"Command is unavailable" if the active window is the macro window. This
problem occurs because several macro commands are unavailable if the
active window is the macro editing window. Use the appropriate macro
below to determine if this is the case.
http://www.microsoft.com/supportnet/refguide/ Word 2.0, 6.0, 7.0
Word for Windows version 1.x
NOTE: You can include text in the MsgBox command with instructions to
close the window if the window is a macro editing window.
MORE INFORMATION
In version 2.0, 6.0, 7.0 of Microsoft Word for Windows, the WordBasic
SelInfo function can be used to return information about the current
selection. The SelInfo command is not available in versions 1.x of
Word for Windows. The above macro for versions 1.x of Word for Windows
uses the InStr command to determine if a colon is in the window name
in order to determine if a macro window is open.
Type number 27 returns the value -1 if the selection is in a macro
editing window.
REFERENCES"Using WordBasic," by Microsoft and WexTech Systems, page 277 Additional query words: winword2 selinfo workaround
Keywords : kbmacro kbprg kbdtacode kbmacroexample winword macword word6 word7 word95 |
Last Reviewed: December 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |