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