How to automatically repeat table heading ?

asked 2018-10-12 18:38:42 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

as title, I want to convert a lot of RTF files which contains long tables , so I hope LibreOffice can automatically repeat table heading when I use the command like "soffice --headless --convert pdf *.rtf";

I try to assign a Macro to the action "Open the document", it works in GUI mode, but when I try to combine it with the pervious command , it doesn't work, I don't know why
soffice --headless --convert-to pdf tefbas05a.rtf ""

My VBA code

sub Main
rem define variables
dim document as object
dim dispatcher as object
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("")
dispatcher.executeDispatch(document, ".uno:HeadingRowsRepeat", "", 0, Array())
end sub

edit retag flag offensive close merge delete