I want a script which will compare the content of two richtext field named body in form one and body1 in form2. I have created two forms whcich contain a richtext type field and created a categerioze view and created a button named compare in this view which will compare the contain of these two fieds and display in a message.
Sub Click(Source As Button)
Dim session As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc, doc1 As NotesDocument
Dim body, body1 As Variant
Dim view As NotesView
Dim rtitem As NotesRichTextItem
Set session = New NotesSession
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
Set doc1=dc.GetNextDocument(doc)
body = doc.GetItemValue( "body" )
Msgbox body( 0 ), ,"Richtext field of First form"
body1=doc1.GetItemValue("body1")
Msgbox body1( 0 ) ,, "Rich Text field of Second form"
'If body.value=body1.value Then
Msgbox"both are same"
'End If
Msgbox"both are different"
End Sub