erny,
Maybe someone will prove me wrong, but I don't believe KiX has any command or function that would acheive your goal. I would suggest you look to a text editor with macro capability. My old favorite is ED (formerly PE) from WordPerfect Corp. (now defunct), but I'm sure there are many others.

You may, alternatively be able to do it in VB or C but I know neither.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.