This topic has not yet been rated - Rate this topic

OpenXmlPartContainer.ChangeIdOfPart Method

Changes the relationship ID of the part.

Namespace:  DocumentFormat.OpenXml.Packaging
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
public string ChangeIdOfPart(
	OpenXmlPart part,
	string newRelationshipId
)

Parameters

part
Type: DocumentFormat.OpenXml.Packaging.OpenXmlPart
The target part.
newRelationshipId
Type: System.String
The new relationship ID of the part.

Return Value

Type: System.String
The old relationship ID of the part.
ExceptionCondition
ArgumentNullException

Throw when "part" is null reference or the newRelationshipId is null reference.

ArgumentOutOfRangeException

Thrown when the part does not exist under this part.

ArgumentException

Thrown when the specified relationship id is already used by another part.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.