Reputation: 11
I want to create a hyperlink between two bookmarks in VBA word. Here is the code I have come up with, I get a type mismatch error and am unsure why
ActiveDocument.Hyperlinks.Add
Anchor:=ActiveDocument.Bookmarks("TableOfContents_KeyBenefits"), _
Address:=ActiveDocument.Bookmarks, SubAddress:="KeyBenefitsTarget"
Upvotes: 0
Views: 326
Reputation: 166850
ActiveDocument.Hyperlinks.Add _
Anchor:=ActiveDocument.Bookmarks("TableOfContents_KeyBenefits").Range, _
Address:=ActiveDocument.FullName, SubAddress:="KeyBenefitsTarget"
Upvotes: 2