Hi Everyone,
I want to be able to attach .ics appointment files to emails that I send out. The appointment file needs to be generated from Excel, using data in certain cells.
I have investigated trying to have Excel generate the .ics format required into a text file, to save with the .ics extension, but a few issues made it all seem too difficult.
So – if I can generate an Outlook appointment, then just save it with the .ics extension – this should work.
Here’s some code I have found with the bits that need changing:
Tweaking required for
.Start =
.Subject =
.Location =
and saving it as an .ics file
Unfortunately – all too advanced for me to work out...
Any help appreciated!
I want to be able to attach .ics appointment files to emails that I send out. The appointment file needs to be generated from Excel, using data in certain cells.
I have investigated trying to have Excel generate the .ics format required into a text file, to save with the .ics extension, but a few issues made it all seem too difficult.
So – if I can generate an Outlook appointment, then just save it with the .ics extension – this should work.
Here’s some code I have found with the bits that need changing:
Code:
Sub SetAppt()
Dim olApp As Outlook.Application
Dim olApt As AppointmentItem
Set olApp = New Outlook.Application
Set olApt = olApp.CreateItem(olAppointmentItem)
With olApt
.Start = Date + 1 + TimeValue("09:00:00") ‘This should = C25 on current Worksheet (cell contents e.g. 22/09/2009)
.End = .Start + TimeValue("07:30:00")
.Subject = "Piano lesson" ‘This should = C24 on current Worksheet
.Location = "The teachers house" ‘This should = C26 on current Worksheet
.Body = "Don't forget to take an apple for the teacher"
.BusyStatus = olBusy
.ReminderMinutesBeforeStart = 4320
.ReminderSet = True
.Display
'.Save
‘SaveAs “Outlook Reminder For Your Course.ics” on Desktop (and overwrite any existing one automatically)
End With
Set olApt = Nothing
Set olApp = Nothing
End Sub
.Start =
.Subject =
.Location =
and saving it as an .ics file
Unfortunately – all too advanced for me to work out...
Any help appreciated!