Freigeben über


OpenXmlPartContainer.AddExternalRelationship-Methode (String, Uri)

Adds external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead.

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

Syntax

'Declaration
Public Function AddExternalRelationship ( _
    relationshipType As String, _
    externalUri As Uri _
) As ExternalRelationship
'Usage
Dim instance As OpenXmlPartContainer
Dim relationshipType As String
Dim externalUri As Uri
Dim returnValue As ExternalRelationship

returnValue = instance.AddExternalRelationship(relationshipType, _
    externalUri)
public ExternalRelationship AddExternalRelationship(
    string relationshipType,
    Uri externalUri
)

Parameter

Rückgabewert

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

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

Thrown when "relationshipType" or the "externalUri" is null reference.

Siehe auch

Referenz

OpenXmlPartContainer Klasse

OpenXmlPartContainer-Member

AddExternalRelationship Überladung

DocumentFormat.OpenXml.Packaging-Namespace