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.
- isExternal
Type: System.Boolean
Is the hyperlink external to the OpenXmlPackage.
Return Value
Type: DocumentFormat.OpenXml.Packaging.HyperlinkRelationship
An HyperlinkRelationship with the relationship ID.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when "hyperlinkUri" is null reference. |