Hi Kurt,
Kurt Forrester wrote (3-4-2009 7:26)
I am trying to code a Basic script to insert a formatted table into an
existing opened writer document with a caption above the newly inserted
table. I have managed to insert the table and format it as I wish
however I cannot seem to find the method to insert a caption for the
table. Could anybody please point me in the direction of how this is
achieved?
You need the texCursor of the cell(s) in the top row of the table and
set the needed paragraph style there.
oCrs = oTable.getCellByPosition(x, y).createTextCursor()
oCrs.paraStyleName = "Table Heading"
Kindest regards,
Cor
ps: a question like this can best be asked on dev at api.openoffice.org
And when you subscribe first, you won't miss any answers.
To do so, mail to [email protected]
Have you also looked at the api home page ?
http://api.openoffice.org/ There you'll find a link to lot of info, and
the wiki etc.
--
Cor Nouws - nl.OpenOffice.org marketing contact
= "2009 - Develop OOo" = www.nieuwsteoffice.nl =
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]