Compartir a través de


WorkbookBase.FollowHyperlink Method

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.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public Sub FollowHyperlink ( _
    address As String, _
    subAddress As Object, _
    newWindow As Object, _
    addHistory As Object, _
    extraInfo As Object, _
    method As Object, _
    headerInfo As Object _
)
public void FollowHyperlink(
    string address,
    Object subAddress,
    Object newWindow,
    Object addHistory,
    Object extraInfo,
    Object method,
    Object headerInfo
)

Parameters

  • address
    Type: System.String

    The address of the target document.

  • subAddress
    Type: System.Object

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

  • newWindow
    Type: System.Object

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

  • addHistory
    Type: System.Object

    Not used. Reserved for future use.

  • extraInfo
    Type: System.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
    Type: System.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
    Type: System.Object

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

Remarks

Optional Parameters

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

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 Sub WorkbookFollowHyperlink()
    Me.FollowHyperlink("https://www.contoso.com/", NewWindow:=True)
End Sub
private void WorkbookFollowHyperlink()
{
    this.FollowHyperlink("https://www.contoso.com/", true);
}

.NET Framework Security

See Also

Reference

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace