OpenXmlPartContainer.AddHyperlinkRelationship Method (Uri, Boolean, String)

Adds a new hyperlink relationship.

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

Syntax

声明
Public Function AddHyperlinkRelationship ( _
    hyperlinkUri As Uri, _
    isExternal As Boolean, _
    id As String _
) As HyperlinkRelationship
用法
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
)

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" or "id" is null reference.

See Also

Reference

OpenXmlPartContainer Class

OpenXmlPartContainer Members

AddHyperlinkRelationship Overload

DocumentFormat.OpenXml.Packaging Namespace