• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to insert hyperlink in word document

Hi all,
i have little query here,
I am working on the 200 pages document in word 2010, and i need a hyperlink on a every page to go back to the home page(Fisrt page), let say i am on the page number 32 and want to go back the first page it is difficult to go back. I have one way that I can make the hyperlink manually on every page but the document is very larg.

i was trying with some code but not very familiar with vba in word.

Option Explicit
Sub AddHyperlinkToBookmark()
Dim doc As documents
For Each doc In ActiveDocument
Dim oBookmark As Bookmark
Dim oHyperlink As Hyperlink
'***** Add code to select text for bookmark
Set oBookmark = ThisDocument.Bookmarks.Add("BookmarkName", Selection.Range)
'***** Add code to select text for link
Set oHyperlink = ThisDocument.Hyperlinks.Add(Selection.Range, "", "Document Hyper")
Set oBookmark = Nothing
Set oHyperlink = Nothing
Next
End Sub


Please suggest if possible.


Regards
Nipendra
 
Hi, Nipendra.dhiman!

First, these are Excel forums, despite of someone asking very sporadically something non related to Excel and maybe getting an answer. But they post here those questions after having searched the proper forums and Google, which I think it's not your case.

Second, why an hyperlink to do so? Just press Ctrl-Home. Reading built-in or online help is always a good practice.

Regards!
 
Hi, Nipendra.dhiman!
Glad you solved it. Thanks for your feedback and welcome back whenever needed or wanted.
Regards!
PS: Remember that every Office program comes with built-in or online help, so go when any doubt go there before posting; ever.
 
Back
Top