Lotus Notes Calendar V6 vs V5

Newbie here…

I’m not a Notes developer, just a user.

I recently created an Excel VBA program which succesfully loads dated reminders in the Lotus Notes calendar from rows in an Excel spreadsheet.

My version of Notes is V6 and this funtcion works fine.

We still have 40 or so users in our organisation who are using Lotus Notes V5 and unfortunately these users are unable to ‘see’ the reminders.

Below is a snippet of the code to show which fields I am loading:


Set MySession = CreateObject(“notes.NotesSession”) ’ Create a Lotus Notes session object

Set Richstyle = MySession.CREATERICHTEXTSTYLE ’ Create a rich text style object

Set NotesDB = MySession.GETDATABASE(ServerName, MailDbName) ’ Create a Notes Calendar database object

If Not NotesDB.ISOPEN Then Exit Function ’ The required calendar must be open

Set CalenDoc = NotesDB.CREATEDOCUMENT ’ Create ‘Reminder’ Calendar object

Call CalenDoc.REPLACEITEMVALUE(“Form”, “Appointment”) ’ Tell it to use the Appointment form

Call CalenDoc.REPLACEITEMVALUE(“AppointmentType”, “4”) ’ Set the type as ‘Reminder’

Call CalenDoc.REPLACEITEMVALUE(“StartDate”, CStr(FormatDateTime(AppDate, vbShortDate))) ’ Notes Date conversion

Call CalenDoc.REPLACEITEMVALUE(“StartDate_2”, CStr(FormatDateTime(AppDate, vbShortDate))) ’ Notes Date conversion

Call CalenDoc.REPLACEITEMVALUE(“StartTime”, strSTime) ’ Notes Time conversion

Call CalenDoc.REPLACEITEMVALUE(“StartTime_2”, CStr(FormatDateTime(Timex, vbShortDate))) ’ Notes Time conversion

CalenDoc.REPLACEITEMVALUE “ENDDATETIME”, CDate(AppDate & " " & strSTime) ’ Notes Date conversion

CalenDoc.REPLACEITEMVALUE “STARTDATETIME”, CDate(AppDate & " " & strSTime) ’ Notes Date conversion

CalenDoc.REPLACEITEMVALUE “CALENDARDATETIME”, CDate(AppDate & " " & strSTime) ’ Notes Date conversion

Call CalenDoc.REPLACEITEMVALUE(“Categories”, Category) ’ Set the ‘Summary’ category

Call CalenDoc.REPLACEITEMVALUE(“_viewIcon”, Icon)

Richstyle.fontSize = 12 ’ Set rich text style font size

Richstyle.Bold = True ’ Set rich text style weight

Set RTBody = CalenDoc.CREATERICHTEXTITEM(“body”) ’ Create rich text Body object

Call RTBody.APPENDSTYLE(Richstyle) ’ Apply rich text style to the body object

Call RTBody.APPENDTEXT(Body) ’ Append the body object to the body field

Call CalenDoc.REPLACEITEMVALUE(“Subject”, Subject) ’ Set the subject field

Call CalenDoc.COMPUTEWITHFORM(True, False) ’ Validate the form

Call CalenDoc.Save(True, False) ’ Save the Reminder

SendNewNotesAppointment = True

Exit Function

SendNotesErr:

SendNewNotesAppointment = False

Set CalenDoc = Nothing ’ Unload the Calendar object.


To show the reminder on V5 am I missing anything?

Thanks in advance.

Subject: Lotus Notes Calendar V6 vs V5

You’re putting strings into the date and time fields. Try using NotesDateTime objects instead – you can use the string in the constructor (the call to New).

Subject: RE: Lotus Notes Calendar V6 vs V5

Sorry Stan… as I said I’m not a notes developer and the code is copied from another site and much fiddled with so I don’t know the syntax of which you talk.Can you explain with an exampe?

Much appreciated.