Creates a new package part.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
For more information about package parts, see section 1.1 of the Open Packaging Conventions (OPC) specification available for download at http://go.microsoft.com/fwlink/?LinkID=71255.
Notes to Inheritors
internally calls the derived class CreatePartCore method to actually create the part based on the physical format implemented in the derived class.
' Add the Document part to the Package Dim packagePartDocument As PackagePart = package.CreatePart(partUriDocument, System.Net.Mime.MediaTypeNames.Text.Xml) ' Copy the data to the Document Part Using fileStream As New FileStream(documentPath, FileMode.Open, FileAccess.Read) CopyStream(fileStream, packagePartDocument.GetStream()) End Using ' end:using(fileStream) - Close and dispose fileStream.