in reply to Microsoft Word Problem

Did You try it manually?

I always try to solve this problems by recording a macro, doing the things I want, stop recording and translate the VB into Perl.

This works only most times, but helps to find the correct methods, parameters and order.

And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
(Terry Pratchett, Small Gods)