locked
How to add Appointment to Public Calendar via Coldfusion RRS feed

  • Question

  • I am trying to programmatically import an .ics file and create an appointment on our department's Outlook public calendar.

    So far, I have been able to create the ics file, send it as an attachment to various Outlook mailboxes, and have the user's open the attachment, accept (or reject) the appointment, and it show up on theit personal calendars.  This is good, but only part of what is needed.

    However, our department tracks our appointments on an Outlook (currently 2003) Public Calendar that our department administrator has to manually update.  She gets the email (not appointment request since the public calendar does not have an associated email address), and drags it to the calendar.  She edits the suject line a wee bit and then saves it.  If there are only a few entries, this is a workable solution.  However, with 40 to 60 people making calendar appointments every day, it becomes very time consuming.

    So what is necessary to post the appointment directly to this public calendar?  I have the calendar's network address (\\Public Folders\All Public Folders\XXX-ISB) - what more do I need?  Here's how I am constructing the ics file:

    <cfscript>
    function iCalUS(stEvent)
    {
     var vCal = "";
     var CRLF=chr(13)&chr(10);
     var date_now = Now();
      
     vCal = "BEGIN:VCALENDAR" & CRLF;
     vCal = vCal & "PRODID:-//XXXX - YYY//Calendar Application//EN" & CRLF;
     vCal = vCal & "VERSION:2.0" & CRLF;
     vCal = vCal & "METHOD:PUBLISH" & CRLF;
     vCal = vCal & "BEGIN:VEVENT" & CRLF;
     vCal = vCal & "ORGANIZER:MAILTO:First.M.Last@whatever.com" & CRLF;
     vCal = vCal & "DTSTART;VALUE=DATE:20120210" & CRLF; 
     vCal = vCal & "DTEND;VALUE=DATE:20120214" & CRLF;
     vCal = vCal & "TRANSP:TRANSPARENT" & CRLF;
     vCal = vCal & "SEQUENCE:0" & CRLF;
     vCal = vCal & "UID:090000008200E00074C5B7101A82E00800000000D03B6337EC4DC8010000000000000000100
     000004D7E785A84DE164D862B1F35E43440E7" & CRLF;
     vCal = vCal & "DTSTAMP:20120210T000000Z" & CRLF;  
     vCal = vCal & "CATEGORIES:Out of Office" & CRLF;
     vCal = vCal & "SUMMARY:#stEvent.subject#" & CRLF;
     vCal = vCal & "DESCRIPTION:#stEvent.description#" & CRLF;
     vCal = vCal & "PRIORITY:5" & CRLF;
     vCal = vCal & "X-MICROSOFT-CDO-IMPORTANCE:1" & CRLF;
     vCal = vCal & "CLASS:PUBLIC" & CRLF;
     vCal = vCal & "END:VEVENT" & CRLF;
     vCal = vCal & "END:VCALENDAR";
     return Trim(vCal);
    }
    </cfscript>

    The email to the user is sent as:

    <cfmail	to = "unit.admin@whatever.com"
             subject = "Out of Office Appointment Test" spoolenable="no"
             from = "developer@whatever.com">
        <cfmailparam file="\\Netappl02\xxxx\ooo_data\appt.ics" disposition="inline" />
    </cfmail>
    I'm just not sure how to modify this to direct it to that public calendar.
    Monday, February 13, 2012 5:08 PM

Answers

  • You would need something running on the client side to monitor incoming messages/appointment requests and move them to the PF store.

    COM add-in will probably be the best solution.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    Tuesday, February 14, 2012 3:17 AM

All replies