www.webdeveloper.com
Results 1 to 13 of 13

Thread: Adding a 'Add to Outlook Calendar' link to my web page

  1. #1
    Join Date
    Aug 2008
    Posts
    7

    Adding a 'Add to Outlook Calendar' link to my web page

    Does anyone know of an easy way to add this link to my web page?

    'Add to your Outlook Calendar'

    And have that link create an event in Outlook?

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    First you'll have to create a file that represent an Outlook event. Then you'll have to set your web server to serve that file with the proper content-type.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  3. #3
    Join Date
    Aug 2008
    Posts
    7
    Can you point me in the right direction on this please...is there something I have to export from Outlook to do this, then auto download on the server, so the info gets added to the contacts Outlook calendar?

  4. #4
    Join Date
    Aug 2006
    Posts
    1,902
    http://en.wikipedia.org/wiki/ICalendar

    That may or may not help. I'm interested in this myself, but haven't verified this even works at this point. But I'm imagining that you'd create a file in the iCalendar format (as described above), then serve it up as a "text/calendar" MIME type. Not sure what happens when somebody clicks on it, but perhaps (in your case) Outlook gets launched as the application that supports that MIME type, and you're off and running.

    Dave

  5. #5
    Join Date
    Aug 2008
    Posts
    7
    I figured it out...you have to go to the Calendar section in Outlook and sign up for Office Online, then publish the Calendar Event, then create a link in your html code that redirects a user and asks them to download the event into their outlook calendar....hope this helps others out there

  6. #6
    Join Date
    Aug 2006
    Posts
    1,902
    Interesting, thanks for that. In my case, I don't have my events in Outlooks, they're just data in a database. Did you notice if Office Online will take a feed just by giving it "data" as opposed to publishing something out of Outlook? That's why I've been assuming I need to figure out the iCalendar format.

    Dave

  7. #7
    Join Date
    Aug 2008
    Posts
    7
    Dave,

    I beleive you have to have the Events in Outlook...weather or not you can mass import from your database, i dont know, you'd have to research that

  8. #8
    Join Date
    Aug 2006
    Posts
    1,902
    Thanks. I fiddled with it a bit, and an iCal format file when sent to IE 7 launches Outlook and does what you'd expect in terms of treating it like a calendar event. When I send that same file to FF, it displays it in the browser as text (which it is), so I just need to figure out how to actually convice Firefox this is a calendar item that should go to outlook. So there's hope

    In any event, you're all set so I'll stop mucking about in your thread...

    Dave

  9. #9
    Join Date
    Feb 2008
    Posts
    29
    Hey there. Do you know how I could do this with dynamically created events?

    Thanks.

  10. #10
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    You don't have to have a file per se. You can respond to a request with an iCal stream that would be the same as what you would've written to a file.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  11. #11
    Join Date
    Feb 2008
    Posts
    29
    Could you point me in the right direction on how to respond with an iCalendar stream?

    Thanks.

  12. #12
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Dave's Wikipedia link pretty much says everything that can be said without knowing your server side programming environment.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  13. #13
    Join Date
    Sep 2008
    Location
    Newcastle Upon Tyne, England
    Posts
    2

    Creating a stream

    Like someone said above, without knowing your programming environment, it's fairly difficult to give comprehensive instructions, but if I were going to do it in mySQL / php I do it something like this.

    Generate a sample file so you can get the format right.

    Write a php file that sits on the server at location;

    domain.com/calfile.php?eventid=00001

    Then when you visit the above address, the file would have a script inside which would collect the eventid from the URL using GET and would then query the database to find the relevant information. This would then be dynamically injected into a file based on your sample file.

    Using the correct MIME type you would force this to be downloaded to the users desktop which would then open up the rleevant application to save to calendar.


    HTH as a brief overview.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles