我想在VBA单词中的两个书签之间创建超链接。这是我想出的代码,出现类型不匹配错误,不确定为什么
ActiveDocument.Hyperlinks.Add
Anchor:=ActiveDocument.Bookmarks("TableOfContents_KeyBenefits"), _
Address:=ActiveDocument.Bookmarks, SubAddress:="KeyBenefitsTarget"
答案 0 :(得分:2)
ActiveDocument.Hyperlinks.Add _
Anchor:=ActiveDocument.Bookmarks("TableOfContents_KeyBenefits").Range, _
Address:=ActiveDocument.FullName, SubAddress:="KeyBenefitsTarget"