Outlook automation

J

Joan

I use the following code to update the calendar in
Outlook, this works well with the Main calender but I
really want to add the appointments to a copy calendar
named Office Apps. How do I route to this copy.

Thanks for any help.
Joan

Dim objoutlook As Outlook.Application
Dim olAppt As Outlook.AppointmentItem
Set obloutlook = New Outlook.Application
Set olAppt = obloutlook.CreateItem(olAppointmentItem)
Dim iDate As Variant
iDate = Forms!frmevent!End_date

' Set start time for 2-minutes from now...
olAppt.Start = iDate & " " & time

' Setup other appointment information...
With olAppt
.Duration = 15
.Subject = "Meeting to discuss plans..."
'.Body = "Meeting with " & olItem.FullName & " to
discuss plans."
.Location = "Home Office"
.ReminderMinutesBeforeStart = 1
.ReminderSet = True
End With

' Save Appointment...
olAppt.Save
MsgBox "Appointment set"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top