When I do an export of the 4D Write Pro document into. Text object it always 
exports as a mime type or an HTML with nonbreaking spaces document with other 
elements. I can take a 5 page 4D Write Pro document Export it a plain text and 
using the STR_Count_Words function and it will give me a count of 19 words. 
Where when it was in 4D Write it would return 19,365 words. There seems to be a 
slight error in something. Both of the below will fail if the to get e a usable 
word count.



WP EXPORT VARIABLE(WrProObject;$exportText;wk web page html 4D;wk normal)       
        ProtocolWC:=STR_Count_Words ($exportText)

WP EXPORT VARIABLE(WrProObject;$exportText;wk mime html;wk normal)              
        
ProtocolWC:=STR_Count_Words ($exportText)

If there is a way to extract a raw plain text version of the text from the 4D 
Write pro object I would love to find out how.

> On Apr 15, 2020, at 5:50 PM, Randy Kaempen <[email protected]> wrote:
> 
> Eric,
> 
>> On Apr 15, 2020, at 4:48 PM, Eric Naujock via 4D_Tech <[email protected]> 
>> wrote:
>> 
>> Is there a simple way to get a accurate word count for a 4d Write pro 
>> object?  I am trying to be Abe to check if a document is long enough to be 
>> plausibly done. In the past with 4D write I could convert the document to 
>> raw text and use STR_Count_Words to be able to get a word count. But with 
>> the new way 4D Write Pro extracts text out of the Write pro object I am 
>> finding that I do not get a real word count. Has anybody else had something 
>> that can generate an accurate word count for a given 4D Write Pro Object
> 
> What is wrong with the plain text you get out of 4D Write that gives a wrong 
> word count?
> 
> 
> Randy Kaempen
> Intellex Corporation
> 

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to