Link to home
Start Free TrialLog in
Avatar of frankmorrison
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:=olAppointmentItem)
   
   
        objAppointment.Subject = "Test"  'SUBJECT_MATTER
        objAppointment.Location = "Somewhere"
        objAppointment.Start = #1/13/2004 5:01:00 PM#
        objAppointment.Duration = 90
        objAppointment.ReminderMinutesBeforeStart = 15
        objAppointment.BusyStatus = olOutOfOffice
        objAppointment.Body = "blablabla"
        objAppointment.Sensitivity = olPrivate
       
        objAppointment.Save
End Sub

Thanks in Advance

JH
Avatar of Mikal613
Mikal613
Flag of United States of America image

can you check the Appointments in outlook?

or

you can make a database and insert all your appointments and just select your info to c if its there
ASKER CERTIFIED SOLUTION
Avatar of ChenChen
ChenChen
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of frankmorrison
frankmorrison

ASKER

Thanks for your help ChenChen.  It's not 100% accurate, but it was in the right track.

Thanks again.

JH