The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OpenXmlPartContainer.GetPartById Method

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Gets the child part through the relationship ID.

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

public OpenXmlPart GetPartById(
	string id


Type: System.String
Specifies the relationship ID of the part.

Return Value

Type: DocumentFormat.OpenXml.Packaging.OpenXmlPart
Returns the part.


Throws an exception when the part with the specified id does not exist.