Share via


OpenXmlPartContainer.AddHyperlinkRelationship Method (Uri, Boolean)

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 _
) As HyperlinkRelationship
'Usage
Dim instance As OpenXmlPartContainer
Dim hyperlinkUri As Uri
Dim isExternal As Boolean
Dim returnValue As HyperlinkRelationship

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

Parameters

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

Return Value

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

Exceptions

Exception Condition
ArgumentNullException

Thrown when "hyperlinkUri" is null reference.

See Also

Reference

OpenXmlPartContainer Class

OpenXmlPartContainer Members

AddHyperlinkRelationship Overload

DocumentFormat.OpenXml.Packaging Namespace