Aspose::Words::PlainTextDocument::get_BuiltInDocumentProperties method
PlainTextDocument::get_BuiltInDocumentProperties method
Gets BuiltInDocumentProperties of the document.
System::SharedPtr<Aspose::Words::Properties::BuiltInDocumentProperties> Aspose::Words::PlainTextDocument::get_BuiltInDocumentProperties() const
Examples
Shows how to load the contents of a Microsoft Word document in plaintext and then access the original document’s built-in properties.
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(u"Hello world!");
doc->get_BuiltInDocumentProperties()->set_Author(u"John Doe");
doc->Save(ArtifactsDir + u"PlainTextDocument.BuiltInProperties.docx");
auto plaintext = MakeObject<PlainTextDocument>(ArtifactsDir + u"PlainTextDocument.BuiltInProperties.docx");
ASSERT_EQ(u"Hello world!", plaintext->get_Text().Trim());
ASSERT_EQ(u"John Doe", plaintext->get_BuiltInDocumentProperties()->get_Author());
See Also
- Class BuiltInDocumentProperties
- Class PlainTextDocument
- Namespace Aspose::Words
- Library Aspose.Words for C++