I'm using OpenOffice Writer to generate reports. I work in Delphi 2010 and use OLE to communicate with the Writer.
I have a problem with handling text. The text contains tags that I find with FindFirst / FindNext and replaced by data from the database. Tags can be nested (between the opening and closing tag can have other tags, and within a selected range may be a text with different formatting, and also table data).
The database can return multiple values, so I need to duplicate the content inside the opening / closing tags.
How to duplicate the information contained between the opening and closing tags to preserve formatting? And how to run recursively processing within a selected range (FindFirst / FindNext only within the selected range)?
Code: Select all
TextDocument.insertString (SelectedRange, SelectedRange.getString, NotReplace) Code: Select all
dispatcher.executeDispatch (document, ". Uno: Copy", "", 0, Array ())Also I think that I will have problems like this http://user.services.openoffice.org/en/ ... 91#p180530, because, I too use MSOffice documents as a basis. Any ideas?
P.S. Sorry for my bad English.