Find and Replace every occurrence with a bookmark hyperlink

Hello, I have a large document with references to "Schedule D Form of Disbursement Request".  I want to replace each occurrence of this phrase with a hyperlink to the bookmark I made for "Schedule D Form of Disbursement Request" at the end of the document.  

How can I do that?   Let me know if you need additional explanation.
pdvsaProject financeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


pls try

Sub Macro1()

With Selection.Find
    .Text = "Schedule D Form of Disbursement Request"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
End With

Do While Selection.Find.Found = True

    ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:="", _
        SubAddress:="Schedule D Form of Disbursement Request", ScreenTip:="", TextToDisplay:="Schedule D Form of Disbursement Request"


End Sub

Open in new window

pdvsaProject financeAuthor Commented:
Oh I see it is not something canned inside of Word.  I was hoping that there was.  I guess code is the only way.  Let me know if there is another way inside of Word.    thank you
pdvsaProject financeAuthor Commented:
how would I reference the bookmark that ties to the "Schedule D Form of Disbursement Request"?  I entered a bookmark that ties to the "Schedule D Form of Disbursement Request" and need to tie it to all of the hyperlinks.  Not sure if you follow me.  

thank you
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

No I don't
Eric FletcherCommented:
You can do it without a macro.

Create the first instance of the hyperlink normally, then select it and copy it. Then, in the Find and Replace dialog, type Schedule D Form of Disbursement Request in the Find what box. In the Replace with box, type ^c (which is the token for Clipboard contents if you use the Special pulldown button). Replace All will change all instances of the phrase to the phrase set with the hyperlink.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pdvsaProject financeAuthor Commented:
Ok thank you.  I have been out of pocket the whole day.  Hope to test either in a few hours or tomorrow.  Thank you
pdvsaProject financeAuthor Commented:
wow! that worked perfectly! thank you for the expert solution to this issue!!  Have a good night.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.