OpenOffice-OODoc - Replaceable tokens

Posted on Tue May 29 05:18:35 2007 by pauld
Replaceable tokens
Hi all, I'm writing a report script that inserts collected data into various parts of an ODT document. I started off using getUserFieldElement() as the position token, but discovered that they are only useful for simple text replacement (which is useful, but just not the complete solution for me).

Another thing I'm using at the moment is selectElementByBookmark(), which I'm using to insert paragraphs and tables, but unlike user fields there is no visual representation of the bookmark in OpenOffice.

My question is really just a "how would you do it" type question. I'd like to have a situation where the admins who write the report analysis can easily add, remove, or move named tokens in the document that my script can then find and manipulate. Is there any kind of element that is (a)easy for a non-technical person to understand, (b)easy to find one or more occurences (using OODoc), and (c)works well with paragraphs, tables, graphics and other elements.

Thanks for any advice you can give.

Regards, Paul
Direct Responses: 5249 | Write a response