Share via


WorkbookBase.FollowHyperlink Method

Definition

Displays a cached document, if it has already been downloaded. Otherwise, this method resolves the hyperlink, downloads the target document, and displays the document in the appropriate application.

public void FollowHyperlink (string address, object subAddress, object newWindow, object addHistory, object extraInfo, object method, object headerInfo);
member this.FollowHyperlink : string * obj * obj * obj * obj * obj * obj -> unit
Public Sub FollowHyperlink (address As String, Optional subAddress As Object, Optional newWindow As Object, Optional addHistory As Object, Optional extraInfo As Object, Optional method As Object, Optional headerInfo As Object)

Parameters

address
String

The address of the target document.

subAddress
Object

The location within the target document. The default value is the empty string.

newWindow
Object

true to display the target application in a new window. The default value is false.

addHistory
Object

Not used. Reserved for future use.

extraInfo
Object

A string or byte array that specifies additional information for HTTP to use to resolve the hyperlink. For example, you can use ExtraInfo to specify the coordinates of an image map, the contents of a form, or a FAT file name.

method
Object

Specifies the way ExtraInfo is attached. Can be one of the following Microsoft.Office.Core.MsoExtraInfoMethod constants: Microsoft.Office.Core.MsoExtraInfoMethod.msoMethodGet or Microsoft.Office.Core.MsoExtraInfoMethod.msoMethodPost.

headerInfo
Object

A string that specifies header information for the HTTP request. The default value is an empty string.

Examples

The following code example uses the FollowHyperlink method to display the document at a specified address in a new window.

This example is for a document-level customization.

private void WorkbookFollowHyperlink()
{
    this.FollowHyperlink("http://www.contoso.com/", true);
}
Private Sub WorkbookFollowHyperlink()
    Me.FollowHyperlink("http://www.contoso.com/", NewWindow:=True)
End Sub

Remarks

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to