RE: Survey Reminder, GOT IT WORKING!

WHOOHOO

'Get all documents Business Day, 7 days before Now

Dim coll As NotesDocumentCollection

Dim sF As String

sF="Form='Send Survey' & @Date(DateCreated)= [" & newdate & "]"

Set coll = db.Search( sF, Nothing, 0 )

Set doc = coll.GetFirstDocument()



Dim view As NotesView

Dim lookupdoc As NotesDocument

Set view = db.GetView ("(LookupSurvey)")



While Not(doc Is Nothing)

	

	Dim item As NotesItem

	Set item = doc.GetFirstItem("Reviewer")

	Forall reviewers In item.Values

		key=Trim$(reviewers)+"~"+Trim$(Cstr(doc.DateCreated(0)))+"~"+Trim$(doc.Description(0))

		Set lookupdoc = view.GetDocumentByKey (key )

		

		If lookupdoc Is Nothing Then

			recip = reviewers

			subj$ = "Feedback - Reminder"

			msg$ = "Reminder Message" 

			

			*** Send Mail			End If

		

	End Forall

	

	Set doc = coll.GetNextDocument(doc)

Wend