AllCustomXmlParts

Presentation.AllCustomXmlParts 属性

返回演示文稿中的所有自定义数据部分。只读 ICustomXmlPart[].

public ICustomXmlPart[] AllCustomXmlParts { get; }

示例

以下示例展示了如何从 PowerPoint 演示文稿清除所有自定义 XML 部分。

[C#]
using (Presentation pres = new Presentation("PresentationWithCustomXml.pptx"))
{
	// 遍历所有自定义 XML 部分
    foreach (ICustomXmlPart item in pres.AllCustomXmlParts)
    {
        item.Remove();
    }
    pres.Save("out.pptx", SaveFormat.Pptx);
}

另请参见