I am trying to find a character into the body when I send a mail, but this item (Body) not appears on QuerySend event, only appears in QuerySave event. I don´t want this search was in QuerySave.Is there any way to search into the Body on QuerySend event?
Should I use the NotesUIDocument. Refresh method and the begining of the script?
Dim doc As NotesDocument
Dim item As NotesItem
Dim BdyText,text As String
Dim rti As NotesRichTextItem
Set doc = Source.Document
Set rti = doc.GetFirstItem("Body")
Set item = doc.getfirstitem("Body")
BdyText = text
text = rti.GetUnformattedText()
If Instr(BdyText,"Este mensaje está dirigido únicamente a su destinatario") = 0 And Instr(BdyText," La Fundación Tripartita para la Formación en el Empleo no asume responsabilidad") = 0 Then
Call cMemoObject.AñadirPoliticaEmpresa()
End If
Dim doc As NotesDocument
Dim item As NotesItem
Dim BdyText,text As String
Dim rti As NotesRichTextItem
Call source.GotoField("Body")
Call source.refresh(True)
Set doc = Source.Document
Set rti = doc.GetFirstItem("Body")
Set item = doc.getfirstitem("Body")
BdyText = text
text = rti.GetUnformattedText()
If Instr(text,"Este mensaje está dirigido únicamente a su destinatario") = 0 And Instr(text," La Fundación Tripartita para la Formación en el Empleo no asume responsabilidad") = 0 Then
Call cMemoObject.AñadirPoliticaEmpresa()
End If