OpenXmlPartContainer.AddHyperlinkRelationship-Methode (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
)
Parameter
- hyperlinkUri
Typ: System.Uri
The URI of the hyperlink.
- isExternal
Typ: System.Boolean
Is the hyperlink external to the OpenXmlPackage.
Rückgabewert
Typ: DocumentFormat.OpenXml.Packaging.HyperlinkRelationship
An HyperlinkRelationship with the relationship ID.
Ausnahmen
Ausnahme | Bedingung |
---|---|
ArgumentNullException | Thrown when "hyperlinkUri" is null reference. |