Want to give some reminder

I have a subform in which i entered 10 users name and submit it to the approver .Through maildoc.copyto i am able to send copy mail to all 10 users along with the approver .

but here i want one more thing when they get mail , from recieving date and the date which was entered in the subform , if user did not take any action , the two days prior notice will be flashes to each user that some work is still pending with him .

for eg; if he recieves mail on 20/12/2006 and date enterd in the subform is 25/12/2006 , if the task is not completed by 24/12/2006 in that case reminder goes to user until the task is over but reminder will be ended on 25/12/2006

and the next thing is that if date is passed then reminder goes to next ie; approver that this this task is still pending with some user .

thats all it is just a notification , nothing more than that .

in the agent i had written that

Elseif(doc.txtflag(0)=“2”) Then

		If doc.rdhod2approval(0)="Accepted" Then

			If doc.ACDate1(0)<>"" And doc.ACDate2(0)<>"" And doc.ACDate3(0)<>""  Then  

				approve "2",doc.dlgHOD3(0),"3"					

			Else

				Maildoc.CopyTo=array

				approve"2",doc.dlgHOD2(0),"2"

				

			End If

		Elseif doc.rdhod2approval(0)="Modifications Required" Then

			modify "2","2a"

		Else

			reject("2")

		End If

	Elseif(doc.txtflag(0)="3") Then

		If doc.rdHOD3approval(0)="Accepted" Then

			approve "3",doc.dlgHOD4(0),"4"

		Elseif doc.rdHOD3approval(0)="Modifications Required" Then

			modify "3","3a"

		Else

			reject("3")

		End If

can anyone tell me what else i have to add more in it for the reminder

plz give me code in this regard …

Subject: Suggestions - Want to give some reminder

You can use the AdjustDay method of the NotesDateTime object. You can use the field values from your document to form the object.

You may also want to think about refactoring your code to use multiple agents that form specific collections first based on the state of the document then processes the reminders or notifications you want.

My thought on giving out code is that it stiffles your creativity and what you have so far looks great!