Is it possible, via macro, to move (not copy) a pre-existing section, therefore already created and inserted in the writer document?
I thought this code was enough
oD= ThisComponent
refSection = oD.TextSections.getByName ( "sec1")
oV = oD.currentController.virtualCursor
oD.Text.insertTextContent (oV, refSection, False)
this code works well both to move textframes to the current position of the virtualCursor and to insert newly created sections
On the contrary, with pre-existing section this code keep giving me error Type: “com.sun.star.uno.RuntimeException Message:.”
In the absence of the message I do not understand the error
Thanks in advance for any suggestions
Strangely, I also have problems with the section copy & paste, which previously worked, but I’m still testing it.
LO: Version: 6.2.8.2
SO; Ubuntu16.04.1