Easy Lotusscript Error - Please help newbie

Dim db As NotesDatabaseDim memoview As NotesView

Dim dominoview As NotesView

Dim memodoc As NotesDocument

Dim dominodoc As NotesDocument

Dim memoid As NotesItem

Dim dominoid As NotesItem

Dim rtitem As Variant

Sub Initialize

Dim session As New NotesSession

Set db = session.CurrentDatabase

	Set memoview = db.GetView ( "Attach" )

Set memodoc = memoview.GetFirstDocument

Set memoid = memodoc.GetFirstItem ( "ID" )



Set dominoview = db.GetView ( "Order"  )

Set dominodoc = dominoview.GetFirstDocument

Set dominoid = dominodoc.GetFirstItem ( "ID" )



While Not ( memodoc Is Nothing )

	If memoid = dominoid Then  '***** stuck right here - how do I say this correctly?

Set rtitem = New NotesRichTextItem ( memodoc, “Body” )

Call rtitem.CopyItemToDocument ( dominodoc, “FileAttach” )

dominodoc.Processed = “Yes”

Call dominodoc.Save ( False, True )

memodoc.Processed = “Yes”

Call memodoc.Save ( False, True )

Else

Set dominodoc = dominoview.GetNextDocument ( dominodoc )

End If

Set memodoc = memoview.GetNextDocument ( memodoc )

Wend

End Sub

Subject: Easy Lotusscript Error - Please help newbie

Mary

Replace memoid with memoid.values(0) to get the value of the item (and the same for the dominoid). These are Objects rather than variables, so you need to use their methods and properties to get the data that is contained in them. If they were multi-value fields then you could use values(1), values(2) and so on. A single value field will always be values(0)

HTH

Mike

Subject: Easy Lotusscript Error - Please help newbie

replace the code with the line

"

If memoid = dominoid Then '***** stuck right here - how do I say this correctly?"

If memoid(0) = dominoid(0) Then