UpdateDocumentProperties
IPresentationInfo.UpdateDocumentProperties 方法
更新绑定演示文稿的属性。
public void UpdateDocumentProperties(IDocumentProperties documentProperties)
参数 | 类型 | 描述 |
---|---|---|
documentProperties | IDocumentProperties | 文档属性 IDocumentProperties |
示例
此示例展示了如何调用 UpdateDocumentProperties
方法以更新通过调用 ReadDocumentProperties
方法返回的文档属性。
IPresentationInfo info = PresentationFactory.Instance.GetPresentationInfo("pres.pptx");
IDocumentProperties props = info.ReadDocumentProperties();
props.Subject = "New subject";
props.LastSavedTime = DateTime.UtcNow;
info.UpdateDocumentProperties(props);
info.WriteBindedPresentation("new_pres.pptx");