i have the following code which adds an entry to the calander in lotus notes. The problem i have is that unless i turn off the alarms feature from within Notes i get the alarm dialog box pop up when the entry is added. This i supposed to be automated so i dont't want to have to manually set the alarm details everytime. I don;t want the alarm feature permanently turned off either, so is there a way of suppressing or setting the alarm within my code?
Private Sub Command70_Click()
Dim Subject As String
Dim Body As String
Dim StartDate As Date
Dim StartTime As Date
Dim EndTime As Date
Dim EndDate As Date
'Set up the objects required for Automation into lotus notes
Dim Maildb As Object 'The mail database
Dim MailDbName As String 'The persons notes mail database name
Dim CalenDoc As Object 'The calendar entry itself
Dim WorkSpace As Object
Set WorkSpace = CreateObject("Notes.NOTESUIWORKSPACE")
'Duration = 90
StartDate = Date
Subject = "test appointment"
Body = "test appointment details"
StartTime = "19:00"
EndDate = Date + 1
EndTime = "21:00"
MailDbName = "mail\DDPP-5GRCKZ"
'Create a new calender appointment based on template and set the attributes.
Set CalenDoc = WorkSpace.COMPOSEDOCUMENT("DomM1P", MailDbName, "Appointment")
CalenDoc.FIELDSETTEXT "AppointmentType", "2"
CalenDoc.FIELDSETTEXT "Subject", Subject
CalenDoc.FIELDSETTEXT "StartDate", CStr(Format(StartDate, "dd/mm/yy"))
CalenDoc.FIELDSETTEXT "StartTime", CStr(Format(StartTime, "hh:mm"))
CalenDoc.FIELDSETTEXT "EndDate", CStr(Format(EndDate, "dd/mm/yy"))
CalenDoc.FIELDSETTEXT "EndTime", CStr(Format(EndTime, "hh:mm"))
CalenDoc.FIELDSETTEXT "Body", Body
CalenDoc.Save False, False, False
CalenDoc.Close
Set Maildb = Nothing
Set CalenDoc = Nothing
Set WorkSpace = Nothing
End Sub
Only dead fish (and shit) go with the flow!
Private Sub Command70_Click()
Dim Subject As String
Dim Body As String
Dim StartDate As Date
Dim StartTime As Date
Dim EndTime As Date
Dim EndDate As Date
'Set up the objects required for Automation into lotus notes
Dim Maildb As Object 'The mail database
Dim MailDbName As String 'The persons notes mail database name
Dim CalenDoc As Object 'The calendar entry itself
Dim WorkSpace As Object
Set WorkSpace = CreateObject("Notes.NOTESUIWORKSPACE")
'Duration = 90
StartDate = Date
Subject = "test appointment"
Body = "test appointment details"
StartTime = "19:00"
EndDate = Date + 1
EndTime = "21:00"
MailDbName = "mail\DDPP-5GRCKZ"
'Create a new calender appointment based on template and set the attributes.
Set CalenDoc = WorkSpace.COMPOSEDOCUMENT("DomM1P", MailDbName, "Appointment")
CalenDoc.FIELDSETTEXT "AppointmentType", "2"
CalenDoc.FIELDSETTEXT "Subject", Subject
CalenDoc.FIELDSETTEXT "StartDate", CStr(Format(StartDate, "dd/mm/yy"))
CalenDoc.FIELDSETTEXT "StartTime", CStr(Format(StartTime, "hh:mm"))
CalenDoc.FIELDSETTEXT "EndDate", CStr(Format(EndDate, "dd/mm/yy"))
CalenDoc.FIELDSETTEXT "EndTime", CStr(Format(EndTime, "hh:mm"))
CalenDoc.FIELDSETTEXT "Body", Body
CalenDoc.Save False, False, False
CalenDoc.Close
Set Maildb = Nothing
Set CalenDoc = Nothing
Set WorkSpace = Nothing
End Sub
Only dead fish (and shit) go with the flow!