OpenXmlPartContainer.AddNewPart<T> Method

Adds a new part of type T

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


Public Function AddNewPart(Of T As {OpenXmlPart, IFixedContentTypePart}) As T
Dim instance As OpenXmlPartContainer
Dim returnValue As T

returnValue = instance.AddNewPart()
public T AddNewPart<T>()
where T : OpenXmlPart, IFixedContentTypePart

Type Parameters

  • T
    The class of the part.

Return Value

Type: T
The added part.


Exception Condition

When the part is not allowed to be referenced by this part.

See Also


OpenXmlPartContainer Class

OpenXmlPartContainer Members

AddNewPart Overload

DocumentFormat.OpenXml.Packaging Namespace