Ask Your Question

How do I print specific page in Calc with macro?

asked 2018-07-17 16:00:14 +0200

dope_hat gravatar image

updated 2018-07-18 02:50:15 +0200

Ratslinger gravatar image

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("")
Dispatcher.executeDispatch(Document,".uno:Print", "", 0, Array())
End sub
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-08-01 16:19:35 +0200

Name the area of ​​page one, in the macro select this area to print.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-07-17 16:00:14 +0200

Seen: 455 times

Last updated: Aug 01 '18