Consulting

Results 1 to 3 of 3

Thread: Solved: Outlook - Export Appointments as Icalendars

  1. #1
    VBAX Regular
    Joined
    Sep 2005
    Location
    Rome
    Posts
    20
    Location

    Solved: Outlook - Export Appointments as Icalendars

    Hi there,
    Does anyone know of a way to export a range of appointments into the Icalendar format?
    It can be done on a one-to-one basis, but I'm sure there's a faster way using VBA.

    Any help appreciated.

    GSD

  2. #2
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    You could try this one. Beware, no errorchecking so I'm not sure if it will work in every possible situation.[VBA]Sub export_selected_agenda()
    'First show you agenda in listview
    'view - active appointments instead of day, week, month view
    'This will produce a list of future appointments.
    'Select the ones you want and call this macro.
    Const mypath As String = "C:\Data\Ical\"
    Dim mycalitem As Outlook.AppointmentItem
    If ActiveExplorer.Selection.Count = 0 Then Exit Sub
    For Each mycalitem In ActiveExplorer.Selection
    mycalitem.SaveAs mypath & Split(mycalitem.Start, "/")(2) & _
    "-" & Split(mycalitem.Start, "/")(1) & _
    "-" & Split(mycalitem.Start, "/")(0) & _
    " - " & Split(mycalitem.End, "/")(2) & _
    "-" & Split(mycalitem.End, "/")(1) & _
    "-" & Split(mycalitem.End, "/")(0) & _
    " - " & mycalitem & "-" & mycalitem.Subject & ".ics", Type:=olICal
    Next mycalitem
    End Sub[/VBA]

  3. #3
    VBAX Regular
    Joined
    Sep 2005
    Location
    Rome
    Posts
    20
    Location
    Hey that's fantastic - it works a treat, thanks.

Posting Permissions

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