Hello there, I have a little macro issue and need little help.
In Calc, I have a active button with attached macro in my case to print the sheet. But there’s a 3 Pages in this sheet and I want to print only Page 1 (yes I know in printer selection menu I can select which page to print, but this is not a option for me ) Can anyone help me with this? I want in the macro to decide which page will be printed.
Thank you very much,
Here’s my macro:
Sub PrintDoc
Dim Document As object
Dim Dispatcher As Object
Document = ThisComponent.CurrentController.Frame
Dispatcher = createUNOService("com.sun.star.frame.DispatchHelper")
Dispatcher.executeDispatch(Document,".uno:Print", "", 0, Array())
End sub