QuerySend & Body item. Question

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?

Thanks

Subject: QuerySend & Body item. Question

The field availability is not dependent on the event. Can you post your code?

Shawn

Subject: RE: QuerySend & Body item. Question

This is the code on QuerySend event

Sub QuerySave(…)

    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	

End Sub

Thanks

Subject: Solved

I have added this two lines at the begining of the QuerySend event

    Call source.GotoField("Body")

Call source.refresh(True)

And this is the complete code:

    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