Good morning,
Apparently in 4D V17 a new command WP Get Text was added. I missed that
one since the last time I was messing with this code I was using 4D v16r5. This
command allows you to get a plaintext version of any 4D Writ pro object. I
mention this just for reference to prevent future questions.
https://docs.4d.com/4Dv18/4D/18/WP-Get-text.301-4523001.en.html
<https://docs.4d.com/4Dv18/4D/18/WP-Get-text.301-4523001.en.html>
> On Apr 15, 2020, at 6:08 PM, Randy Kaempen <[email protected]> wrote:
>
> Eric,
>
>> On Apr 15, 2020, at 5:00 PM, Eric Naujock <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> 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.
>
> A lot of the former 4D Write commands are now the styled text commands.
>
> $Text:=ST Get plain text($FieldPtr->)
>
>
> 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]
**********************************************************************