I need some guidance. I am using a udf written by Chris wigginton and I can't get it to work. Here is my code. Any help or guidance is greatly appreciate.
<cfcase value="Add to Outlook"> <cfscript> /** * Produces output used by the vCalendar standard for PIM's (such as Outlook). * There are other tags available such as (CF_AdvancedEmail) that will support multi-part mime encoding where the text of the attachment can be imbeded right into the email * * @param stEvent Structure containg the key/value pairs comprising the vCalendar data. Keys are shown below: * @param stEvent.description Description for the event. * @param stEvent.subject Subject of the event. * @param stEvent.location Location for the event. * @param stEvent.startTime Event's start time in GMT. * @param stEvent.endTime Event's end time in GMT. * @param stEvent.priority Numeric priority for the event (1,2,3). * @return Returns a string. * @author Chris Wigginton ([EMAIL PROTECTED]) * @version 1.1, April 10, 2002 */ function vCal(stEvent) { var description = ""; var vCal = ""; var CRLF=chr(13)&chr(10); if (NOT IsDefined("stEvent.startTime")) stEvent.startTime = DateConvert('local2Utc', Now()); if (NOT IsDefined("stEvent.endTime")) stEvent.endTime = DateConvert('local2Utc', Now()); if (NOT IsDefined("stEvent.location")) stEvent.location = "N/A"; if (NOT IsDefined("stEvent.subject")) stEvent.subject = "Auto vCalendar Generated"; if (NOT IsDefined("stEvent.description")) stEvent.description = "Autobot VCalendar Generated"; if (NOT IsDefined("stEvent.priority")) stEvent.priority = "1"; vCal = "BEGIN:VCALENDAR" & CRLF; vCal = vCal & "PRODID:-//Microsoft Corporation//OutlookMIMEDIR//EN" & CRLF; vCal = vCal & "VERSION:1.0" & CRLF; vCal = vCal & "BEGIN:VEVENT" & CRLF; vCal = vCal & "DTSTART:" & DateFormat(stEvent.startTime,"yyyymmdd") & "T" & TimeFormat(stEvent.startTime, "HHmmss") & "Z" & CRLF; vCal = vCal & "DTEND:" & DateFormat(stEvent.endTime, "yyyymmdd") & "T" & TimeFormat(stEvent.endTime, "HHmmss") & "Z" & CRLF; vCal = vCal & "LOCATION:" & stEvent.location & CRLF; vCal = vCal & "SUMMARY;ENCODING=QUOTED-PRINTABLE:" & stEvent.subject & CRLF; vCal = vCal & "DESCRIPTION;ENCODING=QUOTED-PRINTABLE:"; // Convert CF_CRLF (13_10) into =0D=0A with CR/LF and indent sequences description = REReplace(stEvent.description,"[#Chr(13)##Chr(10)#]", "=0D=0A=#Chr(13)##Chr(10)# ", "ALL"); vCal = vCal & description & CRLF; vCal = vCal & "PRIORITY:" & stEvent.priority & CRLF; vCal = vCal & "END:VEVENT" & CRLF; vCal = vCal & "END:VCALENDAR" & CRLF; return vCal; } </cfscript> <cfscript> stEvent = structnew(); stEvent.description = '#qForApptInfo.Appttype#'; stEvent.subject = 'Apointment with #qForApptInfo.Company#'; stEvent.location = '#qForApptInfo.Location#'; stEvent.startTime = '#Dateformat(qForApptInfo.ApptDate, 'mmmm dd,yyyy') & Timeformat(qForApptInfo.apptTime, 'hh:mm tt')#'; stevent.endtime = '#Dateformat(qForApptInfo.ApptDate, 'mmmm dd,yyyy') & Timeformat(qForApptInfo.apptTime, 'hh:mm tt')#'; vCalOutput = vCal(stEvent); </cfscript> <cffile action="write" file="C:/file.vcs" nameconflict="makeunique" output="#vCalOutput#" mode="777" /> </cfcase> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254833 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4