Changin page margin with macro and prevent tables to split across pages with macro

Every day I have to download an .odt file. Its margin used to be 2.00 cm I have to change the top and bottom margin to 0.40 cm. Similarly there used to be nearabout 50 tables in it. The tables should not be splitted across the pages. These things are not possible by recording macro. I need its code. Any help please.

The macro document at http://www.pitonyak.org/oo.php is your friend.

  • Setting margins is described in section 5.10.
  • IsSplitAllowed is described in section 8.2.

I managed to create macro for setting page margin. But dont know how to use issplitallowed

The document explains to use getRows() and then set IsSplitAllowed to false for each row. Please edit the question and show the code you have tried so far.