Hi there!

So I've found the code below here: http://www.google.com/support/forum/...64cffe90&hl=en - Full credit goes to user 'tpuiatti'.


Sub Generate_ICS()
    Dim rng1 As Range, X, i As Long, v As Long
    Dim objFSO, objFile
    Dim FilePath As String
    FilePath = "G:\Service.ics"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.CreateTextFile(FilePath)
    Set rng1 = Range([a5], Cells(Rows.Count, "H").End(xlUp))
    X = rng1
 
    objFile.write "BEGIN:VCALENDAR" & vbCrLf
    For i = 1 To UBound(X, 1)
        objFile.write "BEGIN:VEVENT" & vbCrLf & "DTSTART:" & Format(X(i, 2), "yyyymmdd") & vbCrLf & "DTEND:" & Format(X(i, 2), "yyyymmdd") & vbCrLf & "RRULE:FREQ=YEARLY" & _
                      vbCrLf & "SUMMARY:" & X(i, 1) & vbCrLf & "END:VEVENT" & vbCrLf
    Next i
    objFile.write "END:VCALENDAR"
End Sub
This code takes the info from 2 columns in Excel: A which is the event title and B which is the event date. Then it export these informations to an .ics file which will add the event dates to the Oulook Calendar.


The macro and the .ics work perfectly, however i wan't to make a few changes/additions to fit my needs. Additionally I wan't this macro to:

- Pick up dates from column 'F' instead of 'B'. (I've tried to just change B to F, but that didn't work)
- Make the events all day events, so that the starting time is not showed up in the calendar, but only the title/name.
- Put in a reminder 1 week before.
- Place all the events in a category.
- Include additional information (another column) with descriptions for every event.. And also add a 4th column with location info.


I know nothing about Excel macros and/or VBA, but the solution might be simple.


Thanks in advance!

Best regards
Jeppe C.