paildukkha
New Member
- Joined
- Mar 10, 2014
- Messages
- 8
Hi,
I want to create outlook appointments in outlook 2010.
Below is the code which creates appointments.
Few issues which I need to fix -->
How do I invite attendees, if any?
Below code creates duplicates
For instance if the appointment is altered, how do I ask the macro to update the calendar?
Need an option for it to go to personal calendar or shared calendar.
Please assist.
Thanks,
Sub Add_Appointments_T
utlook_Calendar()
'Include Microsoft Outlook nn.nn Object Library from Tools -> References
Dim oAppt As AppointmentItem
Dim Remind_Time As Double
i = 2
Subj = ThisWorkbook.Sheets(1).Cells(i, 2)
'Loop through entire list of Reminders to be added
While Subj <> ""
Set oAppt = Outlook.Application.CreateItem(olAppointmentItem)
oAppt.Subject = Subj
oAppt.Location = ThisWorkbook.Sheets(1).Cells(i, 3)
oAppt.Start = ThisWorkbook.Sheets(1).Cells(i, 4)
oAppt.End = ThisWorkbook.Sheets(1).Cells(i, 5)
oAppt.Body = ThisWorkbook.Sheets(1).Cells(i, 6)
'oAppt.AllDayEvent = True
oAppt.Save
i = i + 1
Subj = ThisWorkbook.Sheets(1).Cells(i, 2)
Wend
MsgBox "Reminder(s) Added To Outlook Calendar"
End Sub
I want to create outlook appointments in outlook 2010.
Below is the code which creates appointments.
Few issues which I need to fix -->
How do I invite attendees, if any?
Below code creates duplicates

For instance if the appointment is altered, how do I ask the macro to update the calendar?
Need an option for it to go to personal calendar or shared calendar.
Please assist.
Thanks,
Sub Add_Appointments_T

'Include Microsoft Outlook nn.nn Object Library from Tools -> References
Dim oAppt As AppointmentItem
Dim Remind_Time As Double
i = 2
Subj = ThisWorkbook.Sheets(1).Cells(i, 2)
'Loop through entire list of Reminders to be added
While Subj <> ""
Set oAppt = Outlook.Application.CreateItem(olAppointmentItem)
oAppt.Subject = Subj
oAppt.Location = ThisWorkbook.Sheets(1).Cells(i, 3)
oAppt.Start = ThisWorkbook.Sheets(1).Cells(i, 4)
oAppt.End = ThisWorkbook.Sheets(1).Cells(i, 5)
oAppt.Body = ThisWorkbook.Sheets(1).Cells(i, 6)
'oAppt.AllDayEvent = True
oAppt.Save
i = i + 1
Subj = ThisWorkbook.Sheets(1).Cells(i, 2)
Wend
MsgBox "Reminder(s) Added To Outlook Calendar"
End Sub