Varied Length for the Rich Text

HI,

I am getting the varied length for the Rich Text Data Type content.

For Example,

If the content of the RichText field is “abcdefgh” then i get the length of the Rich Text field as 8.

I am using “Len” function to find the length of the field.

But if i have 100 contiguous characters “abcdefgh…” (without blank space or enter characters in the richtext field) then i am getting the length as 112 and it varies depends on the content.

Is it like the Rich Text internally stores any information regarding the content or could be any other reason ?

Thanks in advance.

Subject: Varied Length for the Rich Text

If you are interested in the size of the actual text in your rich text field then:

  1. Grab the rich text item from your document using a NotesRichText object.

  2. Measure the length of the NotesRichText object’s .Text property.

The reason that the length of the rich text field does not match the character count of the text is because the length includes space required for things like tables, formatting styles, etc.

HTH

Subject: RE: Varied Length for the Rich Text

Thank you so much for the response Dave.

  1. In the Rich Text field i haven’t used any tables but as you said if it takes for formatting styles then it should be a fixed variation for the whole rich text content because the formatting is same for the whole content.

  2. If i add some more text with the same format then i can see more variations with the content length than i get it before.

  3. I hope internally domino wraps after 80 characters and for a wrapping it takes as 2 characters will this might be a reason for it?

Thanks in advance

Subject: RE: Varied Length for the Rich Text

Sorry Santhosh but I have no idea idea how the Notes rich text items work under the hood. Ben L is much more knowledgable than I am on such matters. The information that I have already provided you with is straying into speculation territory so I don’t want to add anything at this point.

Rather than try and guess what the mysteries of the NotesRichTextItem are, I think it would probably be more productive to figure out what the problem is that you are having and start there. Perhaps there is an alternative approach that would eliminate the need to understand the inner workings of Notes RTIs.

Subject: RE: Varied Length for the Rich Text

Thank you so much for your valuable points Dave.

I would check as you suggest.

Regards,

Santhosh.