Are you looking to run a command after the user opens a
document? For that you need to create a command that end in
"_onOpen.htm" like foo_onOpen.htm. You can look at Design
Notes_onOpen.htm as an example. It looks like CommunityMX has a
tutorial on this as well:
http://www.communitymx.com/abstract.cfm?cid=848F7
If this doesn't answer your question can you provide more
details with what you'd like to do?
Thanks