Go To, Page feature is slightly more complex in
WordPeffect 10+ than in earlier versions. For those who want to go to a
specific page number in WP10+ with fewer keystrokes, here's a small
macro (Go to page number.wcm) to do it.
You can assign
it to a keystroke for convenience. The default "Go To" dialog is
<Ctrl+G>, so assigning it to <Alt+G> might be useful.
◄- The downloadable compiled macro is included inside the Zip file in the left column. But for those who want to view the raw (plain text) macro code, see below.
(To copy the code into your WordPerfect program to create a working macro see here. Or just download the compiled version from the left column.)
// Macro code begins here
Application (WordPerfect; "WordPerfect"; Default!)
// Store the current page number -
// Get the desired page number from the user -
"Enter the page number to go to: ";
"'Go to Page Number' - (c) 2006 by Barry MacDonnell")
If (vNewPage<=0) // (error check)
"You must enter a number greater than 0 (zero).")
vNewPage:="" // (discard value)
Go(GetNumb@) // (loop back and redisplay dialog)
// Go to the desired page -
PosPage (Volume:NoneSpecified!; Chapter:NoneSpecified!; Page: vNewPage)
// Get the actual destination page's number (it could be less than the input number) -
// Display appropriate message -
If (vNewPage>vEndPage) // (if input number is larger than destination page number)
If(vEndPage=vStartPage) // (if they are the same, display message and quit)
"You are already at the end of the document - there is no page "+vNewPage ;
"You are now at the end of the document - there is no page "
"Remain at this location? (No=Return to previous page)" ;
If(vAns=2 or vAns=6) Go(End@) Endif // (if Cancel message or Yes, quit now)
PosPage (Volume:NoneSpecified!; Chapter:NoneSpecified!; Page: vStartPage)
"You are already on page "+vStartPage)
// Macro ends here