Hi Mac,
Thank you for evaluating Syncfusion products.
Word countYou can display number of words in a document using WordCount property of document as follows.
[C#]
doc.BuiltinDocumentProperties.WordCount
To return all the words in a documentWe don't have direct support for displaying all the words in a document. You need to enumerate the document elements starting from sections and need to check whether each paragraph item in the section contains any Text to display. Here is a code snippet.
[C#]
// Enumerate the document elements starting from sections
foreach (IWSection sec in doc.Sections)
{
foreach (IWParagraph para in sec.Paragraphs)
{
for (int i = 0; i < para.ChildEntities.Count; i++)
{
Syncfusion.DocIO.DLS.IParagraphItem pItem = para[i] as Syncfusion.DocIO.DLS.IParagraphItem;
//Check if the type of element is a text
if (pItem is IWTextRange)
{
IWTextRange cellText = pItem as IWTextRange;
String s = cellText.Text.ToString();
Console.WriteLine(s.ToString());
}
}
}
Finally , you can display all the words in a string IWTextRange.Text.
Sample referencePlease refer the sample that demonstrates the same.
http://websamples.syncfusion.com/samples/DocIO.Windows/F71041/main.htmPlease let me know if this helps you.
Regards,
Jaya