Instr doesn't search in section

Hi,

I’m trying to add a disclaimer everytime a user send an email to the internet.

I added the code bellow in my “New Memo” form and it is working fine.

My problem is when I reply with history, I search the Body field if the disclaimer is already in the email. I use the function “Instr” to search for specifics word. The function doesn’t search in the Notes section (history). When you "Reply with history, everything is contains in the BODY field, Instr should search the entired BODY field even if their is section in it.

Any idea why it doesn’t work?

Thank you for your help,

Alexandre

Dim session As New NotesSession

InternetMail=False

Call source.Refresh

SendTo=Source.FieldGetText(“SendTo”)

If Instr(SendTo,“.”) >0 And Instr(SendTo,“@”) Then InternetMail=True

CopyTo=Source.FieldGetText(“CopyTo”)

If Instr(CopyTo,“.”) >0 And Instr(CopyTo,“@”) Then InternetMail=True

If InternetMail Then

BdyText = Source.FieldGetText( “Body” )

If Instr(BdyText,“contains”) = 0 Then

Call Source.FieldAppendText (“Body”,Chr(10))

Call Source.FieldAppendText (“Body”,"-- ")

Call Source.FieldAppendText (“Body”,Chr(10))

Call Source.FieldAppendText (“Body”,“This message contains information which may be confidential and privileged.”)

End If

End If

Subject: Instr doesn’t search in section

Hi,

I just realize by erasing the Notes letterhead in the History section, the Instr function is able to find the specific words I want to find.

What could cause the Insrt function to stop searching the BODY fiend in the Memo form?

Thanks,

Alexandre