OpenXmlPackage.CreateMediaDataPart Method (String)

Creates a new MediaDataPart to the document package.

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

Syntax

声明
Public Function CreateMediaDataPart ( _
    contentType As String _
) As MediaDataPart
用法
Dim instance As OpenXmlPackage
Dim contentType As String
Dim returnValue As MediaDataPart

returnValue = instance.CreateMediaDataPart(contentType)
public MediaDataPart CreateMediaDataPart(
    string contentType
)

Parameters

Return Value

Type: DocumentFormat.OpenXml.Packaging.MediaDataPart
The added MediaDataPart.

Exceptions

Exception Condition
ArgumentNullException

Thrown when contentType is null reference.

See Also

Reference

OpenXmlPackage Class

OpenXmlPackage Members

CreateMediaDataPart Overload

DocumentFormat.OpenXml.Packaging Namespace