Share via


Application.WebOpenHyperlink Method

Project Developer Reference

Opens the document specified by a hyperlink address. This method is only available when the selected assignment, resource, or task field contains a hyperlink.

Syntax

expression.WebOpenHyperlink(Address, SubAddress, AddHistory, NewWindow)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Address Optional String The address of the target document. If Address is omitted, the text of the selected field is used.
SubAddress Optional String A location within the target document.
AddHistory Optional Boolean True if the target document should be added to the History folder. The default value is True.
NewWindow Optional Boolean True if the target document should display in a new window. The default value is False.

Return Value
Boolean

Example
The following example inserts a hyperlink in the Gantt Chart and then opens it.

Visual Basic for Applications
  Sub WebOpen_Hyperlink()
'Activate Gantt Chart
ViewApply Name:="&Gantt Chart"
SelectRow Row:=2, RowRelative:=False
InsertHyperlink Name:="http://MSDN/", Address:="http://msdn.microsoft.com/", SubAddress:="", ScreenTip:=""

'Open the web page
WebOpenHyperlink Address:="http://msdn.microsoft.com/", SubAddress:=""

End Sub

See Also