Freigeben über


OpenXmlPartContainer.AddHyperlinkRelationship-Methode (Uri, Boolean, String)

Adds a new hyperlink relationship.

Namespace:  DocumentFormat.OpenXml.Packaging
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Function AddHyperlinkRelationship ( _
    hyperlinkUri As Uri, _
    isExternal As Boolean, _
    id As String _
) As HyperlinkRelationship
'Usage
Dim instance As OpenXmlPartContainer
Dim hyperlinkUri As Uri
Dim isExternal As Boolean
Dim id As String
Dim returnValue As HyperlinkRelationship

returnValue = instance.AddHyperlinkRelationship(hyperlinkUri, _
    isExternal, id)
public HyperlinkRelationship AddHyperlinkRelationship(
    Uri hyperlinkUri,
    bool isExternal,
    string id
)

Parameter

  • hyperlinkUri
    Typ: System.Uri
    The URI of the hyperlink.

Rückgabewert

Typ: DocumentFormat.OpenXml.Packaging.HyperlinkRelationship
An HyperlinkRelationship with the relationship ID.

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Thrown when "hyperlinkUri" or "id" is null reference.

Siehe auch

Referenz

OpenXmlPartContainer Klasse

OpenXmlPartContainer-Member

AddHyperlinkRelationship Überladung

DocumentFormat.OpenXml.Packaging-Namespace