[kubuntu] Libre Office automation ideas wanted

view story

http://ubuntuforums.org – I have a property management programme written in Gambas. At the moment, to send a letter to a tenant I open a template annd cut & paste key data (name, address etc). What would be the best way to automate this? Any ideas would be welcome. Ubuntu 12.04 KDE 4.8.1 Gambas3 (Hardware)