Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim maildb As NotesDatabase
Dim maildoc As NotesDocument
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim item As NotesItem
Set uidoc = workspace.currentdocument
Set doc = uidoc.Document
\' Get the reader name and current date & time
user = Evaluate(\"@Name([Abbreviate]; @UserName)\")
dateread = Evaluate(\"@Now\")
readstring = user(0)
readstringdate = dateread(0)
displayall = readstring & \" : \" & readstringdate
\' Append the current reader and date to the WhoRead field
Set item = doc.GetFirstItem( \"WhoRead\" )
Call item.AppendToTextList(displayall)
Call doc.Save(False,True)
\' Mail the data to the log database for easy searching
mailsubject = uidoc.FieldGetText(\"Subject\")
Set maildb = session.currentdatabase
Set maildoc = New NotesDocument ( maildb )
maildoc.Form = \"Memo\"
maildoc.SendTo = \"name of mail-in database\"
maildoc.Subject = \"Read America Wire Dcoument titled: \" + mailsubject
Call maildoc.Send( False )