O'Reilly logo

Learn OpenOffice.org Spreadsheet Macro Programming by Dr. Mark Alexander Bain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Formatting the Printed Page

You may decide that you don't need any more than the basic formatting that we've looked at so far. If that's the case, then you'll just want to print, and so we'll look a few of the simple ways that a macro can help you

Adding a Page Break

Before printing your document you may decide that the default page breaks are not quite in the right places. For instance, one of them may split the data that you want to be kept together. A simple line of code allows you to add a page break exactly where you need it:

oSheet.Rows(1).IsStartOfNewPage = True

You can tell where page breaks are by looking for blue lines in the worksheet:

Or, of course, you can always click on File | Page Preview. And don't forget—you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required