ms word: vba code for hyperlink to the page number

touchmove

New Member
Joined
May 18, 2015
Messages
10
Hi everyone!


Please allow me to post ms word question in this forum. Hoping there is some ms word expert there who may help me with my problem.

My boss wants me to create an hyperlink so that when I click a text it would link to a certain page number within the same file.

The problem is I need to create like 200 hyperlinks.

Here is the sample data:


Part I: General Requirements for Preventive Fire Protection in Buildings
Code
Page
General
1-1
7
Title
1 / 1-1
10
Purpose
2 /1-1
10

<tbody>
</tbody>


Now, when I click General, it should hyperlink to page 7 of the document. The problem is I have a lot of text to create an hyperlink to and create a vba code is surely a great help.
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
2,019
Office Version
  1. 365
Platform
  1. Windows
Why would you not post this in a Word forum where you probably have a better chance at getting the best answer? If you do, you should post here that you have cross posted there. From a quick Google search on "word vba code for hyperlink to page number" it is obvious that you are not the first to want to do this. From reading a couple of responses to that search, it is not something I as an Access/Excel vba user would wade into even though complete code functions were given to the requestor. Then again, maybe you will get lucky askin the question here.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,567
Messages
5,596,908
Members
414,110
Latest member
docops

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top