0

フォーム 1 の body とフォーム 2 の body1 という名前の 2 つのリッチテキスト フィールドの内容を比較するスクリプトが必要です。リッチテキスト タイプのフィールドを含む 2 つのフォームを作成し、categerioze ビューを作成し、このビューで比較という名前のボタンを作成しました。このビューでは、これら 2 つのフィールドの内容を比較してメッセージに表示します。

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
4

1 に答える 1

0

これは手動で行う必要があります。ここで説明されているように、検索機能を使用できます。

http://msdn.microsoft.com/en-us/library/bb787877%28VS.85%29.aspx#re_operations

box2 内の box1 opf のコンテンツ全体を検索します。一致した場合は、この一致が box2 の唯一のコンテンツであるかどうかを確認します。その場合、内容は同じです。

于 2010-12-02T09:47:05.580 に答える