Creating an ICS in LotusScript

Jan 8, 2008

Creating ICS (iCalendar) files can be handy especially in environments where Lotus Notes is not the main email/scheduling system. There are many ways to create the ICS file but it has to maintain this format. Ellie Harmon wrote a sample and description of the format here.


BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER:MAILTO:
DTSTART:
DTEND:
LOCATION:
TRANSP:OPAQUE
SEQUENCE:0
UID:
DTSTAMP:
DESCRIPTION:
SUMMARY:
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR 

The one trick with Lotus Notes is the date formats. Use this script to format your dates:


Call parentDoc.AppendItemValue( "icsStartDate", Format(item.DateTimeValue.LSGMTTime, "yyyymmdd\Thhmmss\Z")) 

If you don’t need a time, replace “hhmmss” with “000000.”"

In once scenario… I allowed users to download an ICS based on a document they were viewing on the web. If you want to try that… print this code as the first line of your agent:


Print |Content-Type:text/calendar| &Chr(13) & Chr(10)| 
by tom | Categories: lotus, programming, web design |

One Response so far | Have Your Say!

  1. Jaime Bisgrove
    January 8th, 2008 at 11:09 am #

    Nice work Tom !

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>