Groups > WordPerfect Office > WordPerfect 12 > Re: Print page range macro




Print page range macro

Print page range macro
Thu, 10 Apr 2008 23:09:37 -040
With WP12 I miss the feature in WP7's print dialog where the multiple 
page print from and to page specifications had scrolling numbers for 
selections, and I could bypass typing page numbers, something I often 
mangle. My usual printing action is the current page, so that's my 
default print setup. The next most frequent scenario is from the current 
page to some page beyond. I've created a macro that consists simply of 
PageNumberingDlg () where I can copy the page number from the Set Value, 
and paste it as the start page. I wonder, though, if there's a better 
way to accomplish getting the start page into the print pages dialog?

David
Post Reply
Re: Print page range macro
Fri, 11 Apr 2008 08:54:25 -050
pageString=?Page+", "+(?Page+1)
Clipboardput(pageString)

InvokeDialog(PrintDlg)
Wait(1)
Sendkeys("{Alt+G}{Shift+Ins}")
Post Reply
Re: Print page range macro
Fri, 11 Apr 2008 12:50:50 -040
I'm saving both macros, since both accomplish ways of printing that I want.

I made a change to Roy's macro by removing
PrinterSelectByName (PrinterName: "")
and inserting as the first action
PrinterSelectDlg ()
to allow me to choose a printer.

Thank you both very much.

David
Post Reply
Re: Print page range macro
Fri, 11 Apr 2008 14:38:33 GMT
D381e:
> I wonder, though, if there's a better 
> way to accomplish getting the start page into the print pages dialog?
>
Better to go the whole hog: write a macro that sets up a Print as you 
wish it to be. A macro can pick up the current page number, using 
?Page. The command GetNumber() offers one way for the user to specify 
the pages to be printed.

I recorded a macro, and tweaked it a little.
You should Record a macro while summoning the Print Dialog, and replace 
this PrinterSelectByName() line with the one you record.
Of course this is a very basic macro, capable of much development.

=====
Application(wp;"WordPerfect")

vP1 =?Page
GetNumber(vP1; "First page: "; "Print selected pages")
GetNumber(vPL; "Last page: "; "Print selected pages")

PrinterSelectByName (PrinterName: "")
PrintRangeFrom (Page: vP1)
PrintRangeTo (Page: vPL)
PrintInColor (State: True!)
PrintGraphics (State: False!)
PrintWithDocumentSummary (State: False!)
PrintCopies (NumberOfCopies: 1)
PrintSortOrder (Order: Group!)
PrintDestination (Destination: DriverPort!)
PrintGraphically (State: False!)
PrintTwoSided (Option: None!)
PrintInReverseOrder (State: False!)
PrintBooklet (State: False!)
PrintAction (Action: MultiplePages!)
Print()
Return
=====
-- 
Good wishes!
Roy Lewis
C_Tech volunteer
(UK)

Post Reply
about | contact