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

Bagmita - May 29, 2009 at 12:09 AM - Latest reply:  VBA guru
- Aug 6, 2010 at 04:08 PM
Hello,
Can any one tell me how go to next page in microsoft word doc using Excel Vba + macro code
See more 

7 replies

Best answer
21
Thank you
Here is the code todo that in VBA:-

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

Thank you, VBA guru 21

Something to say? Add comment

CCM has helped 1683 users this month

mubashir aziz 191 Posts Sunday April 12, 2009Registration date February 16, 2010 Last seen - May 29, 2009 at 01:44 AM
8
Thank you
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.
mubashir aziz 191 Posts Sunday April 12, 2009Registration date February 16, 2010 Last seen - May 29, 2009 at 02:52 AM
2
Thank you
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 .....
2
Thank you
Here is the code in VBA to do that:-
Selection.GoTo What:=wdGoToPage, Which:=lNextPage

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