Ask a question Report

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

Bagmita - Latest answer on Aug 6, 2010 04:08PM
Hello,
Can any one tell me how go to next page in microsoft word doc using Excel Vba + macro code
Read more 
Answer
+20
moins plus
Here is the code todo that in VBA:-

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

Answer
+8
moins plus
You can use bookmarks for this purpose ....... this is the combination of bookmarks and hyper link .....


Bagmita- May 29, 2009 02:42AM
Can you share with me the actual codes how this can be done.
Answer
+2
moins plus
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 .....

Answer
+1
moins plus
Sorry this is not my requirement.

Answer
+1
moins plus
i think he wanted to Go on Table of Contents page from anywhere in the document. Using the button

Answer
+1
moins plus
Here is the code in VBA to do that:-
Selection.GoTo What:=wdGoToPage, Which:=lNextPage

Where lNextPage = the page number you wanna go to

This document entitled « go to next page in word doc using VBA code » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.

Not a member yet?

sign-up, it takes less than a minute and it's free!

Members get more answers than anonymous users.

Being a member gives you detailed monitoring of your requests.

Being a member gives you additional options.