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

Application.FollowHyperlink 方法 (项目)Application.FollowHyperlink Method (Project)

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

打开由超链接地址指定的文档。Opens the document specified by a hyperlink address.

语法Syntax

表达式FollowHyperlink(* 地址子地址 * AddHistory,* *数字)expression. FollowHyperlink( ** Address, ** SubAddress, ** AddHistory, ** NewWindow )

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
AddressAddress可选OptionalStringString在目标文档的地址。如果省略Address参数而选择一个文本域,将使用所选字段的文本。如果省略Address参数而未选中的文本字段,项目将返回一个错误。The address of the target document. If Address is omitted and a text field is selected, the text of the selected field is used. If Address is omitted and a text field is not selected, Project returns an error.
子地址SubAddress可选OptionalStringString目标文档内的一个位置。A location within the target document.
AddHistoryAddHistory可选OptionalBooleanBoolean如此如果目标文档添加到历史记录文件夹。默认值为TrueTrue if the target document should be added to the History folder. The default value is True.
数字NewWindow可选OptionalBooleanBoolean如此如果要在新窗口中显示目标文档。默认值为FalseTrue if the target document should display in a new window. The default value is False.

返回值Return Value

BooleanBoolean

示例Example

以下示例将在自己的窗口中打开一个指向 Microsoft 网站的超链接。The following example opens a hyperlink to the Microsoft Web site in its own window.

Sub GoToMicrosoft() 
    Application.FollowHyperlink Address:="http://www.Microsoft.com", _ 
        NewWindow:=True, AddHistory:=True 
End Sub
© 2018 Microsoft