Hidden RichTextItem Data

I am attempting to append/copy (whatever way will work) a richtextitem to a newly created document and then send that document through email.

Here is the code that I am using to do this.

Dim workspace As New NotesUIWorkspace

Dim session As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim uidoc As NotesUIDocument

Set db = session.CurrentDatabase

Set uidoc = workspace.CurrentDocument

Set doc = uidoc.Document

Dim maildoc As New NotesDocument(db)

Set BodyRichText = New NotesRichTextItem(maildoc, “Body” )

Set mainItem = doc.GetFirstItem(“eventMain”)

Call BodyRichText.AppendRTItem(mainItem)

maildoc.sendto =“David Godlewski”

Call maildoc.send(False)

The main problem I’m having is that the body item does not show in the mailed document. If I look at the document properties I can see the “Body” item and it has the correct information in the field, but it will not display on the document.

Also, If I put the mailed document in edit mode and attempt to type in the space where there should be a body field, nothing happens… it’s like there is no body field.

As I mentioned earlier I have tried several different ways to copy/append this RichTextItem onto my maildoc and always get the same result.

Has anyone ever ran into this issue before or perhaps something similar?

Subject: Hidden RichTextItem Data

Are there hide-when formulas/flags in the original rich text field? These may be carried through to the destination.

Subject: RE: Hidden RichTextItem Data

There originally were hide-when formulas/flags in the rich text fields but as I was trying to solve this issue I removed all hide-whens. It didn’t make any difference.

Subject: RE: Hidden RichTextItem Data

In case anyone else comes across an issue like this, here is what the problem was…

The hide-when formula that was on the form design was propogating to the actual rich-text that was on documents created with this form. Removing the hide-when formulas from the form design would certainly correct this issue on new documents but because I was testing with a document that was created before I removed the hide-when formulas the text still had the hide-when properties on it. When I highlighted the text in the document and looked at the text properties I could clearly see that the rich text still had the hid-when applied to it. After removing this hide formulas from the RICHTEXT as well as the fields on the form (in designer) this problem exists no more!