Here's the code that is used in the MLS Calendar export routine to outlook.
It worked under IE6 but quit working when I upgraded to IE7

You also have to add a line to the "secure sites" portion in IE.

Hope this helps
-------------------
<SCRIPT LANGUAGE=VBScript>
'Outlook export subs for Calendar Items
'olAppointmentItem = 1, olTaskItem = 3, olNoteItem = 5
 Dim oApp
 Dim ObjTask, oRS, oSQL, oAllDay, oStatus, oStartDate, oEndDate, oID
Sub CreateAppt(oID)
 on error resume next

 Set oApp = CreateObject("Outlook.Application")
  if err.number<>0 then
'alert "This Function is not available with your current Security Settings."
 err.clear
 window.open "../contactmanager/securityhelp.asp?is_pop_win=true"
 exit sub
end if
 'oSQL = "SELECT * FROM CAL_EVENTS WHERE CE_ID = " & oID
 set oRS = CreateObject("ADODB.Recordset")
oRS.open "http://www.navica2.net/215/msobject/calendarExport.asp?eventID="; & oID

 Set ObjTask = oApp.CreateItem(1)

 if NOT isNull(oRS("CE_START_TIME")) then
   oAllDay = false
oStartDate = oRS("CE_START_DATE").value & " " & formatDateTime(oRS("CE_START_TIME").value, vblongtime) oEndDate = oRS("CE_END_DATE").value & " " & formatDateTime(oRS("CE_END_TIME").value, vblongtime)
 else
   oAllDay = true
oStartDate = formatDateTime(oRS("CE_START_DATE").value, vbshortDate)
oEndDate = oRS("CE_END_DATE").value & " 12:01:00 AM"
 end if
 With ObjTask
   if isNull(oRS("CR_CE")) then
  .Start = oStartDate
     .End = oEndDate
end if
   .AllDayEvent = oAllDay
   if oRS("CE_LOCATION") <> "" then .Location = oRS("CE_LOCATION").value
   .Subject = oRS("CE_TITLE").value
.Body = oRS("CE_BODY").value
.ReminderSet = True
   .ReminderPlaySound = True
   .ReminderMinutesBeforeStart = 15
   .Save
 End With

 'New Recur
 if NOT isNull(oRS("CR_CE")) then
   Dim myRecurrPatt
set myRecurrPatt = ObjTask.GetRecurrencePattern
   myRecurrPatt.PatternStartDate = oRS("CE_START_DATE")
myRecurrPatt.PatternEndDate = oRS("CE_END_DATE")
if oRS("CR_MONTH") = 0 then 'Monthly
  myRecurrPatt.Interval = 1
  if isNull(oRS("CR_DAY")) then 'Nth weekday
    myRecurrPatt.recurrenceType = 3
 myRecurrPatt.Instance = oRS("CR_Week")
 myRecurrPatt.DayOfWeekMask = oRS("CR_WeekDay")
  else 'xxth day of the month
    myRecurrPatt.recurrenceType = 2
       myRecurrPatt.DayOfMonth = oRS("CR_Day")
  end if
elseif oRS("CR_WEEK") = 0 then 'Weekly
  myRecurrPatt.Interval = 1
  myRecurrPatt.recurrenceType = 1
  myRecurrPatt.DayOfWeekMask = oRS("CR_WeekDay")
else 'Yearly
  if isNull(oRS("CR_DAY")) then 'Nth weekday
    myRecurrPatt.recurrenceType = 6
 myRecurrPatt.Instance = oRS("CR_Week")
 myRecurrPatt.DayOfWeekMask = oRS("CR_WeekDay")
 myRecurrPatt.MonthOfYear = oRS("CR_Month")
  else 'xxth day of the month
    myRecurrPatt.recurrenceType = 5
       myRecurrPatt.DayOfMonth = oRS("CR_Day")
 myRecurrPatt.MonthOfYear = oRS("CR_Month")
  end if
end if
objTask.Save
 end if

 oRS.close

 Set ObjTask = Nothing
 Set oApp = Nothing
 Set oRS = nothing
End Su
-------------------

Virgil Bierschwale
Armstrong and Skipper Real Estate
(830) 329-6774 Cell
(830) 864-4726 Home
(830) 864-4799 Fax
http://www.bierschwale.com
----- Original Message ----- From: "Graham Brown (CompSYS)" <[EMAIL PROTECTED]>
To: "ProFox Email List" <[email protected]>
Sent: Thursday, October 05, 2006 9:58 AM
Subject: [OT] Outlook calendar


Hi all

I've been asked to look into the following html webpage issue.

You probably know that on webpage a href="mailto: info@" will launch a mail
client to send an email.

What I've been asked to do for my club is find a way so that clicking on a
link will give the option to save an appointment to an outlook calendar.
Evidently EBay used to do this from what I can gather.

Has anyone come across this and can point me in the right direction.

Thanks

Graham Brown
CompSYS Software Solutions

Telephone: 0870 753 8480
General fax: 0870 753 8490
Support fax: 0845 009 4480
Mobile: 07973 988939
email: [EMAIL PROTECTED]
web: http://www.compsys.co.uk

CompSYS is a member of the BNI (Business Network International). If you'd
like to know how the BNI could grow your business or would like to visit one
of the weekly meetings held throughout the area, please let me know.

BNI Plains chapter members cover the following professions: -

Graphic Design, Financial Advisor, Telecoms, Computer Hardware, Banking
Services, Solicitors, Accountancy, Civil Engineers, Estate Agency, Double
Glazing Specialist, Sign Maker, Painting and Decorating and Training
Services.

If you require any of these please let me know and I'll put you in touch.

IMPORTANT: This email (including all attachments) is confidential and may be privileged. It may only be read, copied and used by the intended recipients.
If you are not the intended recipient, you should not disseminate,
distribute or copy this email. Please notify the sender immediately and
delete this email from your system.

The security and reliability of emails is not guaranteed. Verification
should be sought from a mailed or faxed copy. Whilst we operate anti-virus
programmes, emails can become infected after being transmitted. You should
therefore take full responsibility for virus checking.


--- StripMime Report -- processed MIME parts ---
multipart/related
 multipart/alternative
   text/plain (text body -- kept)
   text/html
 image/jpeg
---


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to