Aspose::Words::PlainTextDocument::get_Text method
PlainTextDocument::get_Text method
Gets textual content of the document concatenated as a string.
System::String Aspose::Words::PlainTextDocument::get_Text() const
Examples
Shows how to load the contents of a Microsoft Word document in plaintext.
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Writeln(u"Hello world!");
doc->Save(ArtifactsDir + u"PlainTextDocument.Load.docx");
auto plaintext = MakeObject<PlainTextDocument>(ArtifactsDir + u"PlainTextDocument.Load.docx");
ASSERT_EQ(u"Hello world!", plaintext->get_Text().Trim());
See Also
- Class PlainTextDocument
- Namespace Aspose::Words
- Library Aspose.Words for C++