OpenXmlPartContainer.CreateRelationshipToPart OpenXmlPartContainer.CreateRelationshipToPart OpenXmlPartContainer.CreateRelationshipToPart Method

Definition

Overloads

CreateRelationshipToPart(OpenXmlPart) CreateRelationshipToPart(OpenXmlPart) CreateRelationshipToPart(OpenXmlPart)

Adds a relationship for the specified part to this part.

CreateRelationshipToPart(OpenXmlPart, String) CreateRelationshipToPart(OpenXmlPart, String) CreateRelationshipToPart(OpenXmlPart, String)

Adds a relationship for the specified part to this part.

CreateRelationshipToPart(OpenXmlPart) CreateRelationshipToPart(OpenXmlPart) CreateRelationshipToPart(OpenXmlPart)

Adds a relationship for the specified part to this part.

public string CreateRelationshipToPart (DocumentFormat.OpenXml.Packaging.OpenXmlPart targetPart);
member this.CreateRelationshipToPart : DocumentFormat.OpenXml.Packaging.OpenXmlPart -> string
Public Function CreateRelationshipToPart (targetPart As OpenXmlPart) As String

Parameters

targetPart
OpenXmlPart OpenXmlPart OpenXmlPart

The part to add relationship for.

Returns

A unique relationship identifier.

Exceptions

Thrown when one instance of same type part already exists and multiple instance of that type is not allowed.

Thrown when the targetPart and this part are not in the same OpenXmlPackage.

CreateRelationshipToPart(OpenXmlPart, String) CreateRelationshipToPart(OpenXmlPart, String) CreateRelationshipToPart(OpenXmlPart, String)

Adds a relationship for the specified part to this part.

public string CreateRelationshipToPart (DocumentFormat.OpenXml.Packaging.OpenXmlPart targetPart, string id);
member this.CreateRelationshipToPart : DocumentFormat.OpenXml.Packaging.OpenXmlPart * string -> string
Public Function CreateRelationshipToPart (targetPart As OpenXmlPart, id As String) As String

Parameters

targetPart
OpenXmlPart OpenXmlPart OpenXmlPart

The part to add relationship for.

id
String String String

A unique relationship identifier.

Returns

A unique relationship identifier.

Exceptions

Thrown when one instance of same type part already exists and multiple instance of that type is not allowed.

Thrown when the targetPart and this part are not in the same OpenXmlPackage.

Applies to