Excel VBA – Create iCalendar file

This is some code to create an iCalendar (.ics) file from data in cells

Note: These bits of code are mostly for my own reference, but if anyone else finds them useful all the better.

 

6 comments on “Excel VBA – Create iCalendar file”

  1. Cheers! Just what I needed – playing with a shared Excel calendar and wanted a way for people to be able to add it to their Outlook.

  2. For those new to VBA (like me), if you have trouble running the code at :

    ” Dim CurrentFileSystemObject As New FileSystemObject”

    you need to go, in your VBA editor, in the “Tool” menu, then “Reference”, and then check the box of “Microsoft Scripting Runtime”.

  3. Thanks heaps. I modified it to run in Outlook 2013. For some reason, I had to alter:
    Set CurrentTextFile = CurrentFileSystemObject.CreateTextFile(FullPath)
    to:
    Set fso = CreateObject(“Scripting.FileSystemObject”)
    Set CurrentTextFile = fso.CreateTextFile(FullPath, True)
    to get it to work.

  4. Elo,
    cool!
    I like it!
    do you know how to parameterize a recall?

    Thank’s for your help.

    nb :If you have other parameters for Icalendar, i’m really interested (example : start time, end time).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.