Hello.I have a request to create reminder calendar documents in a mail-in database whenever user send emails to that db with a subject begining with 'r - ’ (r is for reminder)
I have set-up an agent that processes new incoming documents but for some reason I cannot get the calendar reminder document created. Below is the code I am using. If osmeone has any suggestions or an easier method it woiuld be greatly appreciated.
Cheers
NM
Code:
Dim dateTime As NotesDateTime
’ just hard-coding date for now
Set dateTime = New NotesDateTime( "17/11/2006 01:36:22 PM" )
Set docreminder = New NotesDocument( db )
With docreminder
Messagebox "building docreminder"
.ReplaceItemValue "TimeSheetReminder","1"
.ReplaceItemValue "$Alarm", 1
.ReplaceItemValue "$AlarmDescription", "alarm description"
.ReplaceItemValue "$AlarmMemoOptions", ""
.ReplaceItemValue "$AlarmOffset", -1
.ReplaceItemValue "$AlarmSound","tada"
.ReplaceItemValue "$AlarmUnit", "M"
.Replaceitemvalue "$AltPrincipal",Cstr(nam.Canonical)
.Replaceitemvalue "$CSFlags","c"
.Replaceitemvalue "$CSVersion","2"
.Replaceitemvalue "$NoPurge", dateTime.lsLocaltime
.Replaceitemvalue "$PublicAccess","1"
.Alarms = "1"
.AltChair=nam.Canonical
.AppointmentType = "4" '4 for reminder
.Chair=Cstr(nam.Canonical)
.EndDate = dateTime.DateOnly
.EndDateTime=dateTime.lsLocaltime
.EndTime = dateTime.TimeOnly
.ExcludeFromView = ExcludeFromView
'"D;S" ' keeps items out of the draft view.
.Form = "Appointment"
.Replaceitemvalue "From",nam.Canonical
.MeetingType="1"
.OrgRepeat="1"
.OrgTable="C0"
.Principal=Cstr(nam.Canonical)
.SchedulerSwitcher="1"
.SequenceNum=1
.StartDate = dateTime.lsLocaltime
.StartTime = dateTime.TimeOnly
.STARTDATETIME=dateTime.lsLocaltime
.Subject = "cxm test subject"
.tmpAdditionalInviteeButton="1"
.tmpAdditionalRoomsButton="1"
.tmpAppointmentType="Reminder"
.tmpAppointmentType_1="Reminder"
.tmpChair=nam.Canonical
.tmpEventLabel="Reminder"
.tmpOwnerHW="0"
.tmpParticipantHW="1"
.tmpRW="1"
.tmpShowTZ="0"
.txtNum="5"
.UpdateSeq=1
.WebDateTimeInit="1"
.ReplaceItemValue "_viewIcon", 10
.ComputeWithForm True,False
.Save True, False
Messagebox "saving docreminder"
End With