I’ve got an email disclaimer successfully being appended to all letters. I’m trying to test to see if the disclaimers is already there, and if not, append it. It currently appends it all the time, no matter what.
However, I cannot get a handle on the entire Body of a Reply with History letter. I can ‘msgbox’ it to display it (before it is sent) and I only see the new body, not original letter body that is on the form as well.
I’m not sure how it becomes one, as after the letter is sent it all appears in the Body field.
I’ve tried Call Source.Refresh before the ‘If’, and nothing happens. It runs okay but still only sees the new Body. I’ve also tried Call Source.Save and (obviously) get the nested execution error.
If anyone as any insight, it would be much appreciated.
Here is my Reply with History QuerySave event code:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
BdyText = Source.FieldGetText( "Body" )
If Instr(BdyText,"This communication is intended") = 0 And Instr(BdyText,"recipient to which it is addressed") =0 Then
Call Source.FieldAppendText ("Body",Chr(10))
Call Source.FieldAppendText ("Body","------------------------------------------------------------------------------------------------------------------------------ ")
Call Source.FieldAppendText ("Body",Chr(10))
Call Source.FieldAppendText ("Body","This communication is intended for the use of the recipient to which it is addressed, and may ")
Call Source.FieldAppendText ("Body",Chr(10))
Call Source.FieldAppendText ("Body","contain confidential, personal, and or privileged information. Please contact the sender ")
Call Source.FieldAppendText ("Body",Chr(10))
Call Source.FieldAppendText ("Body","immediately if you are not the intended recipient of this communication, and do not copy, ")
Call Source.FieldAppendText ("Body",Chr(10))
Call Source.FieldAppendText ("Body","distribute, or take action relying on it. Any communication received in error, or subsequent ")
Call Source.FieldAppendText ("Body",Chr(10))
Call Source.FieldAppendText ("Body","reply, should be deleted or destroyed ")
Call Source.FieldAppendText ("Body",Chr(10))
End If
Call cMemoObject.QuerySave(Continue)
End Sub