Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Mar 04, 2016 12:12 am

Test 2 words.zip
Hi,
I'm trying to get the wordcount details for some documents which I get in my application. I want to get the wordcount which included textboxes, footnotes and endnotes. I tried the UpdateWordCount method (with true and with out params) and not getting the correct value.

Could you please help with this? Attached is the sample which contains the 2 words from my document and I get only 1 word as wordcount.

Appreciate your help on this.

Thanks.

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Fri Mar 04, 2016 2:36 am

Hi,

Thanks for you posting.
At present the separator "0XA0" has not been added into our Spire.Doc. But we will add it in next version.
Now please try the following solution.
Code: Select all
 
            Spire.Doc.Document doc = new Spire.Doc.Document();
            doc.LoadFromFile(fullDocumentName);
            doc.UpdateWordCount(new char[]{(char)0XA0});
            int count = doc.BuiltinDocumentProperties.WordCount;


We will inform you when new version is released.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Fri Mar 04, 2016 3:46 pm

Thanks alot Amy for the quick response. This definitely improved my count. But it's not matching with the document count. I'm posting the document here for your reference. Can you please help me?

Sorry for the trouble and thanks for all your help.

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Mon Mar 07, 2016 2:48 am

Hello,

Thanks for your feedback. I have noticed the issue and posted it to our Dev team, once it is resolved or we have some other update, we will let you know ASAP.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Mar 09, 2016 3:38 pm

Thanks Gary, will wait for your response on this.

Another question, Is there any way to read the property directly from the Word? For eg: File tab on the ribbon -> Info -> Words.
Can we get it directly? Instead of doing the UpdateWordCount?

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Thu Mar 10, 2016 3:09 am

Hello,

Thanks for your waiting. Now the issue has get resolved, and the new hotfix is in testing, as soon as it is available, we will provide it to you ASAP.
Also, in the next hotfix the UpdateWordCount won't be needed.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Mar 14, 2016 9:09 pm

Hi Gary,
If you can provide any estimate on when the hotfix would be available, that would be of great help. Sorry for the trouble.


Thanks,

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Tue Mar 15, 2016 2:51 am

Hello,

Thanks for your waiting. After testing, there are some issues our Dev team needs to fix further, sorry that I'm afraid that I can't provide you any estimate, as soon as the hotfix is available, we will let you know ASAP.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Mar 24, 2016 7:09 am

Hi,

Thanks for waiting.
New version is available now. Welcome to download and test Spire.Doc Pack(hot fix) Version:5.6.62.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Thu Mar 24, 2016 3:05 pm

Hi Amy,
Thank you very much for the response. I'm using Spire.pdf and Spire.xls too in my project and with the new hotpack, it throws the below exception in my project

The type initializer for 'spr507' threw an exception
"Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

The count is fixed with the new dll though.

Thanks,
Santhoshi.

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Fri Mar 25, 2016 1:36 am

Hi Santhoshi,

Thanks for your feedback.
When using two or more products in one project, that needs to get the related dlls from Spire.Office products.
We will inform you when new version of Spire.Office includes the fix is released.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Sun Mar 27, 2016 3:55 pm

Hi Amy,
Thank you. Will the Spire.Office be released anytime soon?

Thanks,
Santhoshi.

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Mon Mar 28, 2016 3:38 am

Hi Santhoshi,

Sorry that we don't have an exact releasing time of next version of Spire.Office now. But it may be released within this week or next week.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Mon Mar 28, 2016 4:28 am

Thanks Amy, will wait for the release.

Thanks for all your help on this

santuvssantu
 
Posts: 98
Joined: Fri Feb 12, 2016 5:21 pm

Thu Apr 07, 2016 7:35 am

Hi,

Thanks for waiting.
New version has been released. Welcome to download and test Spire.Office Platinum (Hot Fix) Version:2.13.4.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc