You can send an email with a *.vcs file attached that Outlook then sees as a Calendar event that the recipient can add to their calendar.
Below is a function I developed to build the vcs file for my particular purpose that I have decided to share with others. It can easily be modified to accept location, priority, etc as optional parameters that will default to certain values if not provided, but I did not need these things so did not bother. Hopefully others will find this useful and will add then post enhancements.
Garry
Below is a function I developed to build the vcs file for my particular purpose that I have decided to share with others. It can easily be modified to accept location, priority, etc as optional parameters that will default to certain values if not provided, but I did not need these things so did not bother. Hopefully others will find this useful and will add then post enhancements.
Code:
FUNCTION Calendar_vcs AS L (filename AS C, DueDate AS D, StartTime AS C, EndTime AS C, Subject AS C ,Details as c) ' Date in format {31/12/2007} ' StartTime and EndTime in format "h:m:s am/pm" or "h:m:s" or "h:m" dim f as p 'debug(1) newstarttimeseconds = toseconds(StartTime) - (gettimezoneoffset()*3600) if newstarttimeseconds < 0 then newstarttimeseconds = (24*3600)+newstarttimeseconds newstarttime = totime(newstarttimeseconds,2,0) newstartdate = DueDate - 1 elseif between(newstarttimeseconds,0,24*36000) ' newstarttimeseconds = newstarttimeseconds ' so do nothing newstarttime = totime(newstarttimeseconds,2,0) newstartdate = DueDate else newstarttimeseconds = newstarttimeseconds - (24*3600) newstarttime = totime(newstarttimeseconds,2,0) newstartdate = DueDate + 1 end if newendtimeseconds = toseconds(EndTime) - (gettimezoneoffset()*3600) if newendtimeseconds < 0 then newendtimeseconds = (24*3600)+newendtimeseconds newendtime = totime(newendtimeseconds,2,0) newenddate = DueDate - 1 elseif between(newendtimeseconds,0,24*36000) ' newendtimeseconds = newendtimeseconds ' so do nothing newendtime = totime(newendtimeseconds,2,0) newenddate = DueDate else newendtimeseconds = newendtimeseconds - (24*3600) newendtime = totime(newendtimeseconds,2,0) newenddate = DueDate + 1 end if f = file.create(Filename,FILE_RW_EXCLUSIVE) f.write_line("BEGIN:VCALENDAR") f.write_line("PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN") f.write_line("VERSION:1.0") f.write_line("BEGIN:VEVENT") f.write_line("DTSTART:"+date_format(newstartdate,"yyyyMMdd")+"T"+stritran(newstarttime,":","")+"Z") f.write_line("DTEND:"+date_format(newenddate,"yyyyMMdd")+"T"+stritran(newendtime,":","")+"Z") f.write_line("LOCATION;ENCODING=QUOTED-PRINTABLE:Office") f.write_line("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:"+Details+"=") f.write_line("=0D=0A") f.write_line("SUMMARY;ENCODING=QUOTED-PRINTABLE:"+Subject) f.write_line("PRIORITY:3") f.write_line("END:VEVENT") f.write_line("END:VCALENDAR") f.flush() f.close() Calendar_vcs=.t. END FUNCTION
Comment