Calendar Feature Request

This is a follow up to a previous post.

Google calendar has a feature where a person’s daily agenda is emailed to the user each morning at around 5 AM. It contains everything on the person’s calendar for that day. This is a great feature in case people forget to check their calendar but they do check email. I think this would make a great built-in feature in Notes and request that it be included in future releases.

I found an agent (listed below) on the web that accomplishes some of what I want but it needs some work that is beyond my LotusScript skills.

This agent does email me each morning but only sends some of my calendar entries–and only the ones that have alarms.

The requirements are:

The agent must email the person a list of everything on the calenadar for that day.

Also, the agent must be able to automatically email the person who owns the mail file when enabled. It should not be necessary to manually change the code on the agent to do this, as the code below does.

Thanks in advance,

Greg

I found this LotusScript at: http://1mooreblog.blogspot.com/ and it works


Dim session As NotesSession

Dim db As NotesDatabase

Dim vw As NotesView

Dim doc As NotesDocument

Dim docMail As NotesDocument

Dim ndtNow As NotesDateTime

Dim ndtAlarm As NotesDateTime

Dim intCount As Integer

Dim strEvents As String

Dim strRepeat As String

Dim intRepeat As Integer

Sub Initialize

Set session = New NotesSession

Set db = session.CurrentDatabase

Set vw = db.GetView(“($Alarms)”)

Set doc = vw.GetFirstDocument

intCount = 0

Set ndtNow = New NotesDateTime(Now)

strEvents = “”

intRepeat = 0

While Not doc Is Nothing

If doc.GetItemValue(“Repeats”)(0) = “1” Then

If Instr (StrRepeat, doc.UniversalID) = 0 Then

strRepeat = strRepeat & doc.UniversalID & Chr(10)

Else

intRepeat = 1

End If

End If

If intRepeat = 0 Then

If doc.GetItemValue(“Form”)(0) = “Task” Then

Set ndtAlarm = New NotesDateTime(doc.GetItemValue(“DueDateTime”)(0))

Else

Set ndtAlarm = New NotesDateTime(doc.GetItemValue(“StartDateTime”)(0))

End If

If ndtAlarm.DateOnly = ndtNow.DateOnly Then

intCount = intCount + 1

strEvents = strEvents & intCount & ": " & doc.GetItemValue(“Form”)(0) & " " & ndtAlarm.TimeOnly & " " & doc.GetItemValue(“Subject”)(0) & Chr(10) & Chr(10)

End If

End If

intRepeat = 0

Set doc = vw.GetNextDocument(doc)

Wend

If intCount > 0 Then

Set docMail = db.CreateDocument

docMail.Subject = "DAILY AGENDA: " & intCount & " Event(s) For " & ndtNow.DateOnly

docMail.Body = strEvents

Call docMail.Send(False,“My Notes Name/OU/Company”)

End If

End Sub