Ask Your Question

How to make current page printing default in LibreOffice?

asked 2017-06-30 07:00:46 +0200

Br. Sayan gravatar image

updated 2017-06-30 07:02:06 +0200

Is it possible to make current page printing default in LibreOffice writer?

Most of the documents we work with are several pages long, and by default we need to print the only working page. If by mistake a print order is given without selecting the particular page, it would start printing all the pages in the document - say all 700 pages!

So, I'm looking for a way to print only the working page by default.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-06-30 09:01:35 +0200

gabix gravatar image

You can print out just the current page with a simple macro:

Sub PrintCurrentPage
Dim aPrintOps(0) As New
oDoc = ThisComponent
oViewCursor = oDoc.CurrentController.getViewCursor()
aPrintOps(0).Name = "Pages"
aPrintOps(0).Value = trim(str(oViewCursor.getPage()))

End Sub

The code taken from Andrew Pitonyak's Macro document.

edit flag offensive delete link more


Thank you! Assigned a shortcut key...perfectly working!

Br. Sayan gravatar imageBr. Sayan ( 2017-07-10 15:06:02 +0200 )edit

It's a pretty sad indictment of LO (IMO of course) if the best option for a basic feature like "print current page" is to write a macro. I've been using it since the StarOffice days FWIW.

pbhj gravatar imagepbhj ( 2017-12-07 21:46:53 +0200 )edit

@pbnj: the question was different. Your comment is off-topic.

gabix gravatar imagegabix ( 2017-12-08 08:11:05 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-06-30 07:00:46 +0200

Seen: 301 times

Last updated: Jun 30 '17