Go to next page in word doc using VBA code [Solved/Closed]

Report
-
 VBA guru -
Hello,
Can any one tell me how go to next page in microsoft word doc using Excel Vba + macro code

6 replies

Here is the code todo that in VBA:-

Selection.GoTo What:=wdGoToPage, Which:=lNextPage
Where lNextPage is the page number
22
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Posts
191
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
215
You can use bookmarks for this purpose ....... this is the combination of bookmarks and hyper link .....

Can you share with me the actual codes how this can be done.
Posts
191
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
215
If you just want to go on page number then Press F5 and in Goto Tab enter the page number and you will go to on that page ...

But if you have something else in your mind then please do let me know ......

There is some idea of Table of Contents as well that in your main page you can just press the Press Number with some heading and go to that page .... Another idea is Book Mar ... Suppose on Page 5 you have word Page5 now select that Word and go in Insert> Book mark > Give name Page5 (don't use space) and now press Add ....
Now go on first page wirte Go to page 5 and select the whole work "Go to page5" and now go in Insert>Hyperlink >Press Book mark on Right side > now you can see list of book mark which you have created just click page5 book mark .... now you will see word Go to page5" will be in blue color and you'll be able to see while taking your cursot on the text <Ctrl & Click to folow the link> now press Ctrl key from the key board and Click "Go to page5" and you will be on page 5 .....
Here is the code in VBA to do that:-
Selection.GoTo What:=wdGoToPage, Which:=lNextPage

Where lNextPage = the page number you wanna go to
Sorry this is not my requirement.
i think he wanted to Go on Table of Contents page from anywhere in the document. Using the button

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!