Pass thru HTML

I am not able to make it pass thru html with the below code. Please suggest where is the problem

In there are two richtext field on 2 forms. First forms richtext field data will be copied to other richtext field on the other form.

Set rtitemA = doc.GetFirstItem(“Publications_inside”)

Set newdoc = db.createdocument

newdoc.form=“EU”

Set rtitemB = newdoc.CreateRichTextItem( “Publications” )

Set richStyle = s.CreateRichTextStyle

richStyle.PassThruHTML = True

Call rtitemB.AppendStyle(richStyle)

Call rtitemA.CopyItemToDocument( newdoc, “Publications” )

Where is the problem?

Thanks

Subject: Pass thru HTML

Hi,

I think the properties set through script are getting overwritten by the last line i.e. copying itemA to newdoc.

If you could change your code like this:

Set rtitemA = doc.GetFirstItem(“Publications_inside”)

Set newdoc = db.createdocument

newdoc.form=“EU”

Call rtitemA.CopyItemToDocument( newdoc, “Publications” )

set rtitemB = newdoc.GetFirstItem( “Publications” )

If rtitemB.Type = RICHTEXT Then

Set richStyle = s.CreateRichTextStyle 

richStyle.PassThruHTML = True

Call rtitemB.AppendStyle(richStyle)

End If

Hope this helps.

P Patra

Subject: RE: Pass thru HTML

Not solved.

It is again showing the html contents in the text. It is not pass thru the html

Subject: RE: Pass thru HTML

From the help

HTML text may be embedded in a NotesRichTextItem by setting this property and then calling the AppendText method.

It does not state that you can use any other method. Instead of using the CopyItemToDocument method get the text of your rich text field from document1 and then use appendText to copy it to document2.