I am looking for a macro to do following job:

there are a couple of places[ call it page number 10, page number 25 and page number 54] in a word document where a hyperlink is placed to go to a certain part of document [ say page number 40] . the macro should remember the page number from where last hyperlink was activated[ say page 25] . At page number 40 there should be a hyperlink which when clicked should go back to the page number 25. similarly if it was initiated from page 10, it should go to page 10 etc.