SubAddress 属性

       

该属性返回或设置指定超链接目标中命名的位置。String 类型,可读写。

expression.SubAddress

expression   必需。该表达式返回一个 Hyperlink 对象。

说明

命名的位置可以是 Microsoft Word 文档中的书签、Microsoft Excel 工作表中命名的单元格或单元格引用、Microsoft Access 数据库中命名的对象,或者是 Microsoft PowerPoint 演示文稿中幻灯片的序号。

示例

本例显示所选超链接的子地址。

If Selection.Range.Hyperlinks.Count >= 1 Then
    MsgBox Selection.Range.Hyperlinks(1).SubAddress
End If

本例为活动文档中的选定部分添加超链接,设置超链接的目标和子地址,然后将其显示在消息框中。

Set SCut = ActiveDocument.Hyperlinks.Add( _
    Anchor:= Selection.Range, _
    Address:="C:\My Documents\Other.doc", SubAddress:= "temp")
MsgBox "The hyperlink goes to " & SCut.SubAddress