I’m using LibreOffice 24.2.6.2 (X86_64) on Ubuntu 22.04.5 LTS
I’d like to copy a table from one doc to another but this approach isn’t working. It errors on the last line.
strPath = ConvertToUrl("/home/wrg/Documents/projects/MT script test doc5.odt")
oPTGuideDoc = StarDesktop.loadComponentFromURL(strPath, "_default", 0, args())
tables = oPTGuideDoc.TextTables
oBlankSkillTable = tables.getByName("BlankSkillTable")
' Create new doc
oNewDoc = StarDesktop.loadComponentFromURL("private:factory/swriter","_default", 0, args())
'Goto the end of the doc
oInsertPoint = oNewDoc.Text.getEnd()
'Add table from the first doc to this new doc
oInsertPoint.getText().insertTextContent(oInsertPoint, oBlankSkillTable, False)
How can I do that?
Also, can I add the same table twice and merge the two? It may make more sense looking at the table so it’s attached here.
MT script test doc5.odt (27.7 KB)