Print selected pages without printer name

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
abhiabhi_84
Posts: 46
Joined: Wed Nov 19, 2008 7:54 pm

Print selected pages without printer name

Post by abhiabhi_84 »

Hi,

Is it possible to print a few sheets without providing printer name.

Example:

I have a file having 15 sheets. I want to print sheet number 2,3,6 and 8. Also i have users at different location. Hence i cannot give printer name in macro. Can a default printer be picked or printer dialog can appear so that user can select his connected printer.

Kindly provide suggestions.

Regards,
Abhi
OOo 2.3.X on Ms Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Print selected pages without printer name

Post by acknak »

[Moved to Macros and UNO API]
AOO4/LO5 • Linux • Fedora 23
abhiabhi_84
Posts: 46
Joined: Wed Nov 19, 2008 7:54 pm

Re: Print selected pages without printer name

Post by abhiabhi_84 »

no replies? :(
OOo 2.3.X on Ms Windows XP
abhiabhi_84
Posts: 46
Joined: Wed Nov 19, 2008 7:54 pm

Re: Print selected pages without printer name

Post by abhiabhi_84 »

Hi Guys,

I could not found answer to my question so i used default printer.
Now i have a different doubt.

I am using Doc.Print(PrintArray1()) to print document.
But this function prints pages from Active Sheet only.

So i used following code to set active sheet.
Doc.getCurrentController().setActiveSheet(Sheet1)


though this sets active sheet but do not print pages from that page.
page gets active only if i give any message box.

Why i need to show a message box?
Kindly provide your suggestions.

Regards,
Abhi
OOo 2.3.X on Ms Windows XP
Post Reply