Aspose.Words是目前被广泛应用的一款Word文档处理类控件,在Aspose公司的不断努力下,该产品经过不断的完善和增强,很多功能已经完全适应广大客户的需求,通过该产品开发人员可以在应用程序或者项目中实现Word文件的自由创建、编辑、提取和各种文档之间的转换,Word软件可以实现的功能该产品基本上都可以实现,最主要是所有这些功能都是不需要安装Word软件或者任何第三方插件的情况下实现。在使用Word文档时,很多客户需要把Word文档的一些标题、作者等文档默认属性进行修改,那么利用
Aspose.Words可以轻松实现该功能,具体代码如下:
/ The path to the documents directory.
string myDir = GetDataDir_WorkingWithDocument();
// Load the document from disk.
Document doc = new Document(myDir + "Your Document Name.doc");
// Modifying Document Title, Subject and Author Name
doc.BuiltInDocumentProperties.Subject = "Modifying Document Properties";
doc.BuiltInDocumentProperties.Author = "Jawad Ahmed";
// Save the document to disk.
doc.Save("Updated Document Properties.docx");