word macro - navigaiton at pages

A

albatros

hi,

There are 3 command button, "next page", "previous page" and "first page".

I use [appliacation.browser.next] and [application.browser.previous] for
"next page" and "previous page", ok.

///not: for ex. 6 pages ahead I use a for loop: for i=1 to 6:
app.browser.next: next i/

and for the "first page" what should I use ?

Or is there an alternative way for navigation over the pages ?
 
M

macropod

Hi albatros,

The following might give you a few clues:

Go to Top of Current Page
Selection.GoTo What:=wdGoToPage, Name:=""

Go to A Particular Page
Selection.GoTo(What:=wdGoToPage, Name:="4")

Determine The Page Number At The Current Cursor Position.
Selection.Information(wdActiveEndPageNumber)

Go to the Next Page
MyPage = Selection.Information(wdActiveEndPageNumber)
Selection.GoTo What:=wdGoToPage, Name:=MyPage + 1

Go to the Previous Page
MyPage = Selection.Information(wdActiveEndPageNumber)
Selection.GoTo What:=wdGoToPage, Name:=MyPage - 1

Cheers

--
macropod
[MVP - Microsoft Word]


| hi,
|
| There are 3 command button, "next page", "previous page" and "first page".
|
| I use [appliacation.browser.next] and [application.browser.previous] for
| "next page" and "previous page", ok.
|
| ///not: for ex. 6 pages ahead I use a for loop: for i=1 to 6:
| app.browser.next: next i/
|
| and for the "first page" what should I use ?
|
| Or is there an alternative way for navigation over the pages ?
|
|
|
|
|
 
A

albatros

Thank you very much macropod.
I did what I want.
good days.
sincerely

"macropod":
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top