Share via


OpenXmlPartContainer.AddExternalRelationship Method

Definition

Overloads

AddExternalRelationship(String, Uri)

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

AddExternalRelationship(String, Uri, String)

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

AddExternalRelationship(String, Uri)

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

public DocumentFormat.OpenXml.Packaging.ExternalRelationship AddExternalRelationship (string relationshipType, Uri externalUri);
member this.AddExternalRelationship : string * Uri -> DocumentFormat.OpenXml.Packaging.ExternalRelationship
Public Function AddExternalRelationship (relationshipType As String, externalUri As Uri) As ExternalRelationship

Parameters

relationshipType
String

The relationship type.

externalUri
Uri

The external URI.

Returns

An ExternalRelationship with the relationship ID.

Exceptions

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

Applies to

AddExternalRelationship(String, Uri, String)

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

public DocumentFormat.OpenXml.Packaging.ExternalRelationship AddExternalRelationship (string relationshipType, Uri externalUri, string id);
member this.AddExternalRelationship : string * Uri * string -> DocumentFormat.OpenXml.Packaging.ExternalRelationship
Public Function AddExternalRelationship (relationshipType As String, externalUri As Uri, id As String) As ExternalRelationship

Parameters

relationshipType
String

The relationship type.

externalUri
Uri

The external URI.

id
String

The desired relationship ID.

Returns

An ExternalRelationship with the relationship ID.

Exceptions

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

Thrown when the relationship type is hyperlink relationship type (http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink).

Applies to