This can be done quite easily in Word using COM (or OLE, but it's the same with the new name). Depending on what language you intend to do this, you will go differently. Essentially, you need to create a specific type of ActiveX control.
In Delphi (the easiest language for this) you have to create an ActiveXForm in the COM dll, and then you can paste this into your text document. You could make your application as you like in Word (talking with Word is a bit more, but possible).
I do not know what to do in OpenOffice. I'm afraid.
I think you need to return to more specific issues.
Toby allen
source share