Ask Your Question

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

asked 2018-04-11 15:23:29 +0100

Aniruddha Mohod gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-04-11 22:47:24 +0100

Jim K gravatar image

updated 2018-04-11 22:47:56 +0100

The macro document at is your friend.

  • Setting margins is described in section 5.10.
  • IsSplitAllowed is described in section 8.2.
edit flag offensive delete link more


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

Aniruddha Mohod gravatar imageAniruddha Mohod ( 2018-04-22 14:30:47 +0100 )edit

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.

Jim K gravatar imageJim K ( 2018-04-23 21:22:22 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-04-11 15:23:29 +0100

Seen: 101 times

Last updated: Apr 11 '18