How to make current page printing default in LibreOffice?

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.

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

Sub PrintCurrentPage
Dim aPrintOps(0) As New com.sun.star.beans.PropertyValue
oDoc = ThisComponent
oViewCursor = oDoc.CurrentController.getViewCursor()
aPrintOps(0).Name = "Pages"
aPrintOps(0).Value = trim(str(oViewCursor.getPage()))
oDoc.print(aPrintOps())

End Sub

The code taken from Andrew Pitonyak’s OpenOffice.org Macro document.

Thank you! Assigned a shortcut key…perfectly working!

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.

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