Dim rti as NotesRichTextItem
dim strVal as string
Set rti = doc.GetFirstItem("Body")
strVal = rti.Text
'convert tab, lf, to space
strval = replace(strval,asc(5)," ")
strval = replace(strval,asc(10)," ")
strval = replace(strval,asc(13)," ")
'locate "email" in the str
i1 = instr(lcase(strval,"email ")
'strip email off"
strval=trim(mid(strval,i1+5))
locate "phone" n the string
i1 = trim(instr(trim(strval,"phone")
'set new variable to what is between those 2 strings
emailaddress = trim(instr(strval,1,i1))