Hi,
I would like to create an entry in the calendar
so that I can see it when I open up the calendar. I want to do this using lotus script.
When the user accepts a meeting, I want to add another meeting.
For simplicity sake, I have made it so that when the user hits the response/accept,
I get the notes document and create a new document
incrementing the day by one.
So I expect to go to the calendar and see two
meetings. The original one, and one for the day
after.
Here is the code I am trying to do this with, which I would have thought would work,
but I think I am missing one last piece. I would be very grateful if you have the time to take a
look and suggest anything.
Dim theSession As New NotesSession
Dim db As NotesDatabase
Set note = cseventobj.m_ws.currentdocument.document
Dim nextNote As NotesDocument
Set nextNote = New NotesDocument( db )
Call note.CopyAllItems(nextNote, True)
’ add a day to the dates
Dim initialStartDate As String
Dim initialEndDate As String
initialStartDate = nextNote.StartDate(0)
initialEndDate = nextNote.EndDate(0)
’ add one day to the initialStart Date
Dim dtStartDate As New NotesDateTime(initialStartDate)
Dim dtEndDate As New NotesDateTime(initialEndDate)
Call dtStartDate.AdjustDay(1)
Call dtEndDate.AdjustDay(1)
’ need to convert back to text
Dim stringStart, stringEnd
stringStart = dtStartDate.localtime
stringEnd = dtEndDate.localTime
’ set item in nextNote
Dim item As NotesItem
Set item = nextNote.replaceItemValue(“StartDate”, stringStart)
Set item = nextNote.ReplaceItemValue(“EndDate”, stringEnd)
’ save the item in the database
nextNote.Save True, True, True
Josie