frankmorrison
asked on
How to avoid creating duplicate appointments in MS Outlook using VB
Hello gurus,
I'm creating a plugin that creates appointments inside Outlook 2000+ from VB 6. I already have the code for creating those appointments, however, when I create an appointment with the same name and starting time as an existing appointment, Outlook creates a duplicate. Is there any way to avoid duplicates?
Here's s a sample
Private Sub CommandButton1_Click()
Dim objApp As Outlook.Application
Dim objAppointment As Outlook.AppointmentItem
Set objApp = New Outlook.Application
Set objAppointment = objApp.CreateItem(ItemType :=olAppoin tmentItem)
objAppointment.Subject = "Test" 'SUBJECT_MATTER
objAppointment.Location = "Somewhere"
objAppointment.Start = #1/13/2004 5:01:00 PM#
objAppointment.Duration = 90
objAppointment.ReminderMin utesBefore Start = 15
objAppointment.BusyStatus = olOutOfOffice
objAppointment.Body = "blablabla"
objAppointment.Sensitivity = olPrivate
objAppointment.Save
End Sub
Thanks in Advance
JH
I'm creating a plugin that creates appointments inside Outlook 2000+ from VB 6. I already have the code for creating those appointments, however, when I create an appointment with the same name and starting time as an existing appointment, Outlook creates a duplicate. Is there any way to avoid duplicates?
Here's s a sample
Private Sub CommandButton1_Click()
Dim objApp As Outlook.Application
Dim objAppointment As Outlook.AppointmentItem
Set objApp = New Outlook.Application
Set objAppointment = objApp.CreateItem(ItemType
objAppointment.Subject = "Test" 'SUBJECT_MATTER
objAppointment.Location = "Somewhere"
objAppointment.Start = #1/13/2004 5:01:00 PM#
objAppointment.Duration = 90
objAppointment.ReminderMin
objAppointment.BusyStatus = olOutOfOffice
objAppointment.Body = "blablabla"
objAppointment.Sensitivity
objAppointment.Save
End Sub
Thanks in Advance
JH
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help ChenChen. It's not 100% accurate, but it was in the right track.
Thanks again.
JH
Thanks again.
JH
or
you can make a database and insert all your appointments and just select your info to c if its there