If you can do what you want to from within Word, record a macro and copy and modify it as needed in your program.

------------------
Marty