We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

UpdateWordCount is missing in version 16.3.0.21

I was trying to get exact word count in document using below code.

using Syncfusion.DocIO.DLS;
using Syncfusion.DocIO;
using System.IO;

namespace DocIO_MergeDocument
{
class Program
{
    static void Main(string[] args)
    {
       //Creates a new Word document
        WordDocument document = new WordDocument(@"InputDocument.docx");
        //Update the words count in the document.
        document.UpdateWordCount(false);
        //Get the updated words count
        int wordCount = document.BuiltinDocumentProperties.WordCount;
        //Releases the resources occupied by WordDocument instance
        document.Dispose();
    }
}    
}
But thrown Error UpdateWordCount is not in context.


1 Reply

DB Dilli Babu Nandha Gopal Syncfusion Team November 14, 2018 07:09 AM UTC

Hi Mohan, 
 
Thank you for contacting Syncfusion support. 
 
We tried to reproduce the reported issue from our side but the Word counts are updated properly using UpdateWordCount method. We suspect that the reported issue might be document specific i.e., document elements. So, kindly we request you to share the issue causing input Word document which will be helpful for us to provide you a prompt solution at the earliest. 
 
Kindly refer the following forum in which we have discussed about UpdateWordCount and PageCount behaviors in details https://www.syncfusion.com/forums/96363/page-count-of-current-document  
 
Regards, 
Dilli babu. 


Loader.
Live Chat Icon For mobile
Up arrow icon