Microsoft KB Archive/105548: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 28: | Line 28: | ||
Condensed<br /> | Condensed<br /> | ||
Expanded<br /> | Expanded<br /> | ||
FontSize (see the | FontSize (see the "Notes" section below for additional information)<br /> | ||
Lowered<br /> | Lowered<br /> | ||
Raised<br /> | Raised<br /> | ||
Line 63: | Line 63: | ||
For i = ((gm + am) + 388) To (((gm + am) + 388) + 20) | For i = ((gm + am) + 388) To (((gm + am) + 388) + 20) | ||
Insert Str$(i) + Chr$(9) | Insert Str$(i) + Chr$(9) | ||
mn$ = | mn$ = "" : md$ = "" | ||
mn$ = MacroName$(i, 0, - 1) | mn$ = MacroName$(i, 0, - 1) | ||
Bold 1 : Insert mn$ | Bold 1 : Insert mn$ | ||
Bold 0 : Insert Chr$(9) | Bold 0 : Insert Chr$(9) | ||
md$ = MacroDesc$(mn$) | md$ = MacroDesc$(mn$) | ||
If md$ = | If md$ = "" Then md$ = "(none)" | ||
Insert md$ : InsertPara | Insert md$ : InsertPara | ||
Print cm, i, mn$ + | Print cm, i, mn$ + " - " + md$ | ||
Next | Next | ||
End Sub </pre> | End Sub </pre> |
Latest revision as of 09:53, 20 July 2020
MacroDesc$() and CountMacros() Exclude Some Commands |
Q105548
The information in this article applies to:
- Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
- Microsoft Word for Windows, version 7.0
SUMMARY
If you run MacroDesc$() and CountMacros() for the following Word commands, a WordBasic error occurs and the functions return no value:
Columns
Condensed
Expanded
FontSize (see the "Notes" section below for additional information)
Lowered
Raised
FileOpenFile
Shading
Borders
Color
Symbol
These Word for Windows commands do not appear in the Macro Name list, even if you select All Word Commands from the Macros Available In list.
CAUSE
Word does not display these commands because they are not allocated commands, which means they require a parameter that you cannot supply through a Word dialog box.
In contrast, in Word 2.x the MacroDesc$() and CountMacros() functions return values for the above WordBasic commands.
MORE INFORMATION
The following macro will demonstrate this behavior in Word 6.0, 7.0:
Sub MAIN FileNewDefault cm = CountMacros(, - 1) ' Counts All Macros Global, AddIn, BuiltIn gm = CountMacros(0) ' Counts Just Global macros am = CountMacros(,, - 1) ' Counts Just AddIn macros On Error Resume Next For i = ((gm + am) + 388) To (((gm + am) + 388) + 20) Insert Str$(i) + Chr$(9) mn$ = "" : md$ = "" mn$ = MacroName$(i, 0, - 1) Bold 1 : Insert mn$ Bold 0 : Insert Chr$(9) md$ = MacroDesc$(mn$) If md$ = "" Then md$ = "(none)" Insert md$ : InsertPara Print cm, i, mn$ + " - " + md$ Next End Sub
Kbcategory: kbusage kbmacro
Additional query words: 6.0 winword word6 7.0 word95 word7
Keywords :
Issue type :
Technology :
Last Reviewed: November 4, 2000 |