Table of contents
TOC
折叠目录
展开目录

Hyperlink.Address 属性 (Visio)Hyperlink.Address Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

获取或设置形状的超链接对象,超链接被定位到该地址的地址。读/写。Gets or sets the address for a shape's Hyperlink object, the address to which the hyperlink navigates. Read/write.

语法Syntax

表达式地址expression . Address

表达式_一个表示超链接对象的变量。_expression A variable that represents a Hyperlink object.

返回值Return Value

字符串String

注解Remarks

设置超链接对象的地址属性等效于在超链接对话框(插入菜单,在地址框中输入信息,或在该形状中设置 Address 单元格的结果超链接。在 ShapeSheet 窗口中的_名称_行。Setting the Address property for a Hyperlink object is equivalent to entering information in the Address box in the Hyperlinks dialog box ( Insert menu), or setting the result of the Address cell in the shape's Hyperlink. name row in the ShapeSheet window.

地址属性值可以是一个 DOS、 UNC 或 URL 路径,例如, "驱动器号" : _'文件夹名称' \ "drawingname" , \ "服务器名称" \ "文件夹名称" \ "drawingname"http://_地址,分别。The Address property value can be a DOS, UNC, or URL path, for example, "driveletter" :\ "foldername" \ "drawingname" , \ "servername" \ "foldername" \ "drawingname" , or http:// address , respectively.

如果Address属性是相对的例如,"...\ "drawingname" ",它由HyperlinkBase属性,如果提供,或超链接的文档路径。如果不保存文档,则该超链接未定义。If the Address property is relative, for example, "..\ "drawingname" ", it is composed against the HyperlinkBase property, if supplied, or the hyperlink's document path. If the document is not saved, the hyperlink is undefined.

如果Address属性为空,您可以假设该地址指向文档中包含该页面的页面。在这种情况下,子地址属性包含的超链接被定位到该绘图页的名称。If the Address property is empty, you can assume the address points to a page in the document that contains the page. In this case, the SubAddress property contains the name of the drawing page to which the hyperlink navigates.

示例Example

此 Microsoft Visual Basic for Applications (VBA) 宏设置超链接对象的地址属性。运行此示例之前,替换一个有效 Internet 或 intranet 地址_地址_。This Microsoft Visual Basic for Applications (VBA) macro sets the Address property of a Hyperlink object. Before running this example, replace address with a valid Internet or intranet address.


Public Sub Address_Example() 

 Dim vsoShape As Visio.Shape 
 Dim vsoHyperlink As Visio.Hyperlink 

 'Create a new shape to receive the hyperlink 
 Set vsoShape = ActivePage.DrawRectangle(1, 2, 2, 1) 
 Set vsoHyperlink = vsoShape.AddHyperlink 

 vsoHyperlink.Description = "Web site" 
 vsoHyperlink.Address = "http://address /" 

End Sub
© 2018 Microsoft