Mail "todo" list
I wrote this agent to read the default Todo View, and send the user the email with a list of the documents.



Download: IT certifications that stand out
Are you looking to advance your career? Expand your knowledge? Boost your credibility? Our editors put together this complimentary 19-page guide on everything you need to know about obtaining an IT certification—with special attention given to cloud and desktop certifications.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.
Sub Initialize 'Get session to get user Dim session As New NotesSession Dim user As String user = session.CommonUserName 'Get the user's information Dim reg As New NotesRegistration reg.RegistrationServer = "Server00" 'Your server name Call reg.GetUserInfo( user, retmailserver$,retmailfile$, retmaildomain$, retmailsystem%, retprofile$) 'Continue with user information Dim db As New notesdatabase(retmailserver$, retmailfile$) Dim col As notesview Set col = db.getview("($ToDo)") Dim doc As notesdocument Set doc = col.getfirstdocument() Dim mailsubject As String Dim mailBody As Variant Dim count As Integer Dim mybody As String Set doc = col.getfirstdocument() Do While Not (doc Is Nothing) mailsubject = doc.subject(0) Set mailbody = doc.GetFirstItem( "Body" ) If ( mailbody.Type = RICHTEXT ) Then plainText = mailbody.GetFormattedText( False, 0 ) End If Set item = doc.GetFirstItem( "calendardatetime" ) Set mailentry = item.DateTimeValue Count = Count +1 mybody = mybody & Cstr(Count) & "." & "Entered: " &Mailentry.dateonly & " - " & mailsubject &": " & plaintext & Chr(10) & Chr(13) Set doc = col.getnextdocument(doc) Loop Set doc = New notesdocument(db) doc.sendto = user 'doc.copyto = "Bosses Name" 'You can use this line or disregard. Dim datestring As String datestring = Cstr(Today) doc.subject = "Todo list as of: " & datestring doc.form = "Memo" doc.body = mybody Call doc.send(False) End Sub
Start the conversation
0 comments