Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / August 2006



Tip: Looking for answers? Try searching our database.

vcalendar Outlook Export - how is it triggered

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chieffan - 29 Aug 2006 19:55 GMT
I want to create a vcalendar export to Outlook and have seen a few examples.  What I don't know is how does this get triggered?
Webmaster - 29 Aug 2006 23:13 GMT
If the user has the vCard applications installed, the mime type will be
supported in the browser.  So, write the vCard to a file then a
cflocation.

<cfsavecontent variable="vCard">
BEGIN:VCARD
VERSION:2.1
N:#broker_last_name#;#broker_first_name#
FN:#broker_first_name# #broker_last_name#
ORG:#broker_company_name#
NOTE;ENCODING=QUOTED-PRINTABLE:This contacted imported from BLX
Referral Network=0D=0A
TEL;WORK;VOICE:#broker_work_phone#
TEL;CELL;VOICE:#broker_mobile_phone#
TEL;WORK;FAX:#broker_fax#
ADR;WORK:;;#broker_address#;#broker_city#;#broker_state#;#broker_zip#;United
States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:#broker_address#=0D=0A#broker_city#,
#broker_state# #broker_zip#=0D=0AUnited States of Americ=
a
URL;WORK:
EMAIL;PREF;INTERNET:#broker_email_address#
REV:20060810T233632Z
END:VCARD</cfsavecontent></cfoutput>
<cffile action="WRITE" file="FileName.vcf" output="#vCard#"
addnewline="Yes">
<cflocation url="File.vcf" addtoken="No">

AL

> I want to create a vcalendar export to Outlook and have seen a few examples.  What I don't know is how does this get triggered?
LeftCorner - 30 Aug 2006 03:47 GMT
I don't have Outlook installed here so this code may need massaging, I hope it
is self documenting enough to point you in the right direction:

<!--- set up the calendar variables (start/end time, summary, description,
priority and a file name --->
<cfset vCalendar                = StructNew()>
<cfset vCalendar.StartDateTime     = "09/01/2006 08:00 AM">
<cfset vCalendar.EndDateTime     = "09/01/2006 08:00 AM">
<cfset vCalendar.Summary         = "Meeting">
<cfset vCalendar.Description    = "All hands meeting, pizza provided">
<cfset vCalendar.Priority        = 3>
<cfset vCalendar.FileName        = "MyCalendarReminder.vcs">

<!--- create the calendar file contents --->
<cfoutput>
<cfsavecontent variable="vCalendar.Content">
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART:#DateFormat(vCalendar.StartDateTime,
"yyyymmdd")#T#TimeFormat(vCalendar.StartDateTime, "hhmmss")#Z
DTEND:#DateFormat(vCalendar.EndDateTime,
"yyyymmdd")#T#TimeFormat(vCalendar.EndDateTime, "hhmmss")#Z
TRANSP:1
SUMMARY:#vCalendar.Summary#
DESCRIPTION:#vCalendar.Description#
PRIORITY:#vCalendar.Priority#
END:VEVENT
END:VCALENDAR
</cfsavecontent>
</cfoutput>

<!--- write the file contents as a csv file to the server --->
<cffile action="WRITE" file="#ExpandPath(vCalendar.FileName)#"
output="#Trim(vCalendar.Content)#">

<!--- link to the created file --->
<cfoutput>
<a href="#vCalendar.FileName#">#vCalendar.FileName#</a>
</cfoutput>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.