Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-14-2016, 02:16 PM
jroger05 jroger05 is offline How to add a hyperlink in VBA to a bookmark within a document Windows XP How to add a hyperlink in VBA to a bookmark within a document Office 2003
Novice
How to add a hyperlink in VBA to a bookmark within a document
 
Join Date: Aug 2010
Posts: 6
jroger05 is on a distinguished road
Default How to add a hyperlink in VBA to a bookmark within a document

I am trying to use the hyperlinks feature in VBA within word, but when I use the following code it is attempting to create the hyperlink as a link to an existing File or Web page. I want the hyperlink to point to a bookmark named link2create below within the current document. I thought using the address = "" would give me the current document but unfortunately it is not.

ActiveDocument.Hyperlinks.Add Anchor:=oRng, _
Address:="", _
SubAddress:=link2create, ScreenTip:="", _


TextToDisplay:=txt2cpy
Reply With Quote
 

Tags
hyperlink current



Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct Bookmark Hyperlink Phil H Word 2 02-10-2016 12:55 PM
Replicating Insert Hyperlink-Bookmark function Marrick13 Word VBA 0 02-05-2016 01:27 PM
Hyperlink: open the document only once, quit & reopen PP, hyperlink doesnt work anymore quanghuynguyenhua PowerPoint 0 10-10-2015 06:17 PM
How to add a hyperlink in VBA to a bookmark within a document Clicking a Hyperlink to bookmark in other open doc moves that doc's position! diracsbracket Word 1 08-14-2014 04:07 PM
How to highlight bookmark after clicking hyperlink readysteadykitty Word 0 07-04-2013 10:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft