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)

Syntax

'Declaration
Public Function GetPartById ( _
    id As String _
) As OpenXmlPart
'Usage
Dim instance As OpenXmlPartContainer
Dim id As String
Dim returnValue As OpenXmlPart

returnValue = instance.GetPartById(id)
public OpenXmlPart GetPartById(
    string id
)

Parameters

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

Return Value

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

Exceptions

Exception Condition
ArgumentOutOfRangeException

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

See Also

Reference

OpenXmlPartContainer Class

OpenXmlPartContainer Members

DocumentFormat.OpenXml.Packaging Namespace