If a Richtext field is null, is it not stored in the document as ""

I have the following code:

Set CJdoc = CJCollection.getFirstDocument

Do Until CJdoc Is Nothing

	Set rtitem = CJdoc.GetFirstItem("GLBody")

	

	If (rtitem.Type = RichText) Then

		If PlainText = "" Then

			PlainText = "The following text was copied from " & CJdoc.Type(0) & " Log - " & CJdoc.Wed(0) & ": " & Chr(13) & rtitem.GetFormattedText(False,0)

		Else

			PlainText =  PlainText & Chr(13) & Chr(13) & "The following text was copied from " & CJdoc.Type(0) & " Jeers Log - " & CJdoc.Wed(0) & ": " & Chr(13) & rtitem.GetFormattedText(False,0)

		End If

	Else

		Set rtitem = CJdoc.GetFirstItem("Body")

		If (rtitem.Type = RICHTEXT) Then

			If PlainText = "" Then

				PlainText = "The following text was copied from " & CJdoc.Type(0) & " Log - " & CJdoc.Wed(0) & ": " & Chr(13) & rtitem.GetFormattedText(False,0)

			Else

				PlainText = PlainText & Chr(13) & Chr(13) & "The following text was copied from " & CJdoc.Type(0) & " Log - " & CJdoc.Wed(0) & ": " & Chr(13) & rtitem.GetFormattedText(False,0)

			End If

		Else

			If PlainText = "" Then

				PlainText = "There was no information in the Cheers & Jeers document dated " & CJdoc.Wed(0) & "."

			Else

				PlainText = Plaintext & Chr(13) & Chr(13) & "There was no information in the Cheers & Jeers document dated " & CJdoc.Wed(0) & "."

			End If

		End If

	End If

	Set CJdoc = cjcollection.GetNextDocument(CJdoc)

Loop

If glBody has data entered in the field, the code works…

But if not… I get “Object variable not set” on this line of code:

If (rtitem.Type = RichText) Then

I have the field GLBody field on the form. A document is saved using this form. How come in the dcoument properties, I don’t see a GLBody field that = “”

Subject: Because it doesn’t

A rich text field with “no content” almost certainly still has a paragraph definition, or at least a paragraph reference. Thus, it is not equal to “”. That is as simple as that. You may not like it, but it is the nature of the beast.

Subject: RE: Because it doesn’t

Should I see it in the document properties at all.

I am not seeing the field listed at all?

Subject: RE: Because it doesn’t

Hai, Assign the rich text field value to a string. Check whether the string is null or not.