That's a very general question.

One place to start may be with Steve Roman's Writing Word Macros book.
Alse, see http://www.standards.com/index.html?WordVBABooks.