Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Character or Word Count on an RTF Field

Status
Not open for further replies.

USInc

IS-IT--Management
Jul 8, 2010
7
US
A table in our database used to be stored as plain text, however it just got converted over to RTF. Before this I was using len({MyField}) to get a character count. Now this formula doesn't work thanks to the RTF formatting.

So I started using UBound(Split({MyField})) which was great until I realized that some of the data contained more than 1000 words.

So, can anyone help me come up with a way of counting either characters or words (or both)?

Thanks very much!
 
I am thinking that the best solution may be to modify my suggestions above by replacing "fs20" with "fs"
this will leave the numbers, but should remove the majority of the rtf formatting commands.

you could use 'len({@RTF4})' to get the # of characters remaining.
or
you could use 'Count(Split({@RTF4},' '))' to find the # of spaces.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top