Hi Larry
Yes you can. The first part is creating a reference to the "Microsoft Visual Basic for
Applications Extensibility 5.3" library.
The next part is determining in which Module the code should go and if it doesn't exist
create it. Likewise for the function/sub/property, you have to determine whether the
procedure exists, if it does what to do about it or add a new procedure. It can be a
little tricky as the online help aint that great (no surprise here) and aint that
intuitive either.
You then hook the macro to the appropriate menubar.
Over the years I developed a couple of different sets of code to do this. I have some
inline code that creates AutoNew and AutoOpen procedure and adds some code. I also have a
*much* easier to use set of class modules that makes this a lot more trivial. However,
there's a *lot* of code (5 class modules, 500 lines of code).
If either or both of these would be useful to you email me at:
nospaminnerword at xtra dot co dot nz
remove the "nospam" and replace dot with . and at with @. Also because I run two spam
filters (one at my ISP and one on my PC) you message will NOT get through unless you mark
the subject line: "microsoft.public.word.vba.general - VB Extensibility".
HTH + Cheers - Peter