Appending rich text freezes rtf attributes

Have an application where I simply append rich text from an rtf field in another document. But in so doing, the agent works fine, but the rtf attributes in the target field become frozen and can’t later be changed. (e.g. put the document in edit mode, you can’t change the font, size, or any attributes like bold, italic, etc.)

Here’s the simple agent:

Sub Initialize

Dim session As New notessession

Set db = session.currentdatabase

Dim datetime As New NotesDateTime("today")



Set dc = db.Search({ Form = "Engineer Note" & @IsResponseDoc & ProcessFlag != "1"} ,Nothing,0)

Set responsedoc = dc.GetFirstDocument

While Not responsedoc Is Nothing

	unid = responsedoc.parentdocumentunid

	Set parentdoc = db.getdocumentbyunid(unid)

	Set rtitemA = parentdoc.GetFirstItem( "Eng_Notes" )

	Set rtitemB = responsedoc.GetFirstItem( "Body" )

	If ( rtitemA.Type = RICHTEXT And _

	rtitemB.Type = RICHTEXT ) Then

		Dim rtpStyle As NotesRichTextParagraphStyle

		Set rtpStyle = session.CreateRichTextParagraphStyle

		rtpStyle.FirstLineLeftMargin = RULER_ONE_INCH * .50

		rtpStyle.LeftMargin = RULER_ONE_INCH * .50		

		Call rtitemA.AppendParagraphStyle(rtpStyle)				

		author = Evaluate("@name([cn]; author)", responsedoc)

		Call rtitemA.appendtext(datetime.LocalTime + " - " + author(0))

		Call rtitemA.AppendParagraphStyle(rtpStyle)	

		Call rtitemB.AppendParagraphStyle(rtpStyle)						

		Call rtitemA.AppendRTItem( rtitemB )

		parentdoc.Save False, False

	End If

	responsedoc.processflag = "1"

	responsedoc.save False, False

	'Set lastresp = responsedoc

	Set responsedoc = dc.GetNextDocument(responsedoc)

	'Call lastresp.remove(True)		

Wend

End Sub

Any Ideas?

Subject: *Is there a style sheet involved on either document?

Subject: Why are you appending a style into B?

		Call rtitemB.AppendParagraphStyle(rtpStyle)

		Call rtitemA.AppendRTItem( rtitemB )

If you are using R6: I would try

		Call rtitemA.appendtext(datetime.LocalTime + " - " + author(0))

		Call rtitemA.AddNewLine(1, True)

		Call rtitemA.AppendRTItem(rtitemB)

		Call rtitemA.Update

		parentdoc.Save False, False

Subject: RE: Why are you appending a style into B?

The rtf style isn’t really a style sheet, but params to adjust margin, fonts, etc.I took advantage of the feature because the left margin in the parent (target) was getting clobbered by the child (source) without it.

Still, using the properties of an rtf style shouldn’t lock the rtf attributes so it can never be changed in edit mode…should it?

Note that this is not a web app - all access is with the client.