Hi Sophia,
Very interesting! Sorry I didn't post here sooner, before I
started to do my Usnet searching.
Googling can't hurt...
I'm not sure what you mean by a "built-in command."
Is there a list of such things somewhere?
There's a list (for Word97) by Dave Rado at
http://word.mvps.org/faqs/general/CommandsList.htm
I've been meaning to make a new one for Word2003 for some time, but never
got around to it. A list I've done for Word2000/2002 is a 5 MByte table in
disarray, without even info on what command is available in which version,
or on any bugs and problems.
If you have the patience to scroll through "Tools > Macro > Macros... >
Macros in: Word commands", you'll find several commands relating to
AutoText: "AutoText", "CreateAutoText", "EditAutoText" and "InsertAutoText".
Those are (probably) the same commands that are run if you invoke the
AutoText commands from the user interface (with a keyboard shortcut, menu,
or toolbar control). You can see their description, or run them to check out
what they do.
By nature, only commands are listed that don't take arguments. Also, a lot
of the more exotic commands aren't listed (such as "PrivFunctionKey3"
mentioned in my last post).
Nevertheless, it often helps to scroll through the list to see what is
available as built-in functionality.
If you find a command here, you usually will find a button for the same
command in "Tools > Customize > Commands", though it may be hard to find
since you have to guess which button it is (... the name of the command
isn't listed; you have to go by the description).
If you click on a command in the list, switch to "Macros in: Normal.dot" or
another template, and "Create" a macro by the same name, your macro will run
instead of the built-in command. The created macro will usually already
contain the description and some code.
In case you do intercept a couple of built-in commands, it's a good idea to
put them in a separate module. It is easy to forget you have customized a
built-in command, and if Word starts acting weird, it may well be your code.
In old versions up to Word95, macro programming mostly consisted of running
the built-in commands through WordBasic code. But since the macro language
changed to VBA, there's hardly any official documentation. For old commands,
the Word95 help file can sometimes still be useful
(
http://www.microsoft.com/downloads/release.asp?ReleaseID=26572).
Regards,
Klaus