How to prevent duplicating disclaimer on fwds

I have modified the DWA6 template and have tried putting code in either the CoreEmailClasses → QuerySaveExtension or alternatively in the Memo form → QuerySend function. Either way, the disclaimer is appended to the end of the Body field, as desired.

Right now I am using the second method, the QuerySend function of the Memo form. Since I have not copied the code to the Reply form or the Reply With History form, the disclaimer does not get duplicated if I reply (that’s good!)

However, I have not been able to keep the disclaimer from duplicating using the Forward actions. (Not good!) How can I keep Forward from repeating the disclaimer?

Thanks in advance,

John Rowland

Subject: How to prevent duplicating disclaimer on fwds

I’m testing with the following code borrowed from this forum:

Sub Querysend(Source As Notesuidocument, Continue As Variant)

REM Start - added following lines for DISCLAIMER

Call Source.Refresh 

Dim session As New NotesSession

Dim InternetMail, LocalMail, Duplicate, SendTo, CopyTo, BdyTex As Variant

InternetMail=False

LocalMail=False

Duplicate=False



SendTo=Source.FieldGetText("SendTo")

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

If Instr(SendTo,"/") >0 And Instr(SendTo,"MOC") Then LocalMail=True



CopyTo=Source.FieldGetText("CopyTo")

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

If Instr(CopyTo,"/") >0 And Instr(CopyTo,"MOC") Then LocalMail=True



BdyText=Source.FieldGetText("Body")

If Instr(BdyText,"This email") >0 Then Duplicate=True



If Not InternetMail And Not Duplicate Then

	BdyText = Source.FieldGetText( "Body" )

	If Instr(BdyText,"This email is intended") = 0 And Instr(BdyText,"However we accept no") =0 Then

		Call Source.FieldAppendText ("Body",Chr(10))

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

		Call Source.FieldAppendText ("Body",Chr(10))

		Call Source.FieldAppendText ("Body","This email is intended only for the addressee named above and may contain ")

		Call Source.FieldAppendText("Body","confidential or privileged information. If you are not the named addressee or ")

		Call Source.FieldAppendText("Body","the person responsible for delivering the message to the named addressee, ")

		Call Source.FieldAppendText("Body","please be kind enough to telephone us immediately. The contents should not ")

		Call Source.FieldAppendText("Body","be disclosed to anyone nor copies taken. If you contact us by email, we may ")

		Call Source.FieldAppendText("Body","store your name and address to facilitate communication. We take reasonable ")

		Call Source.FieldAppendText("Body","precautions to ensure that our emails are virus free. However we accept no ")

		Call Source.FieldAppendText("Body","responsibility for any virus transmitted by us and recommend that you subject ")

		Call Source.FieldAppendText("Body","any incoming email to your own virus checking procedures.")		

	End If

End If

REM End - added following lines for DISCLAIMER

End Sub

The test for existing disclaimer text in the body field is not working when I forward or reply with history to a message already disclaimed. The same code is on the Memo form and the Reply With History form. Help!

Thanks in advance,

John Rowland

Subject: Problem resolved

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/145becde6abe7e758525702f006b2d14?OpenDocument