You'd need a macro, but you don't provide any where near enough information
for me to even begin to tell you in what direction to start looking. I
suggest you take this question to a more appropriate group, one of the
word.vba ones. Besides describing EXACTLY what you have and what you need,
don't forget to mention the VERSION of Word.