Converting Text field type to Rich Text

Hi – I have situation were I need to updated the value within a Rich Text field.

I have used @Text to convert the Body [Rich Text] field to Text, and updated the file name attachment.

I now need to reset the original field back to a Rich Text type rather than Text.

Any thoughts would be appreciated.

murraycroft@oakmont.co.uk

Subject: Converting Text field type to Rich Text

You can do it using Lotus Script…

Dim doc as notesdocument

Dim body as Notesitem

Dim rtBody as NotesRichtextItem

Dim tempStr As String

'set document…

set doc = …

If doc.HasItem(“Body”) then

set body = doc.getFirstItem(“Body”)

If body.type <> RICHTEXT Then

tempStr = body.text

body.remove

Set rtBody = New NotesRichTextItem( doc, “Body”)

rtBody.appendText( tempStr)

call doc.Save(True,False)

end if

end if

HTH

Adi