Solved

Check if appointment already exists

Posted on 2009-05-10
2
1,274 Views
Last Modified: 2013-11-25
I have created a addin which downloads a series of events from a php webservice and then adds them to the outlook calendar.

I know have a requirement to check if the appointment\event exists before te insert happens. this is to prevent duplicates of the same appointment.

I also need the abiity to change the appointment if the times have changed. Is there anyway of storing a ID number in the appointment.

Many thanks for any help. The code i am using to create the appointment is below.
Private Sub Btn2_Click(ByVal ctrl As Office.CommandBarButton, ByRef cancelDefault As Boolean) Handles btn1.Click
        Dim service As New wsclick.webservice
        Dim events As Array
        Dim uc As New wsclick.userCredentials
        uc.username = My.Settings.uname
        uc.password = My.Settings.pwd
        uc.database = My.Settings.db
        events = service.getEvents(uc)
 
        For Each cevent As wsclick.Event In events
 
 
 
            createEvents(cevent.subject, cevent.startdate, cevent.enddate, cevent.allday, cevent.description, cevent.timezone, cevent.remind, cevent.recurrenceperiod, cevent.recurrenceenddate, cevent.recurrenceoccurrences)
 
        Next
 
 
        MessageBox.Show("You have succesfully synchronised")
 
 
    End Sub
 
    
     Sub createEvents(ByVal subject As String, ByVal startdate As String, ByVal enddate As String, ByVal allday As String, ByVal description As String, ByVal timezone As String, ByVal remind As String, ByVal reccurrenceperiod As String, ByVal recurrencedate As String, ByVal recurrenceoccurencies As String)
 
 
        Dim oevent As Outlook.AppointmentItem = oapp.CreateItem(Outlook.OlItemType.olAppointmentItem)
        With oevent
            .Subject = subject
            .Start = CType(startdate, DateTime)
            .End = CType(enddate, DateTime)
            
            .Save()
        End With
    End Sub

Open in new window

0
Comment
Question by:mm72
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 46

Accepted Solution

by:
tbsgadi earned 500 total points
ID: 24352357
0
 

Author Closing Comment

by:mm72
ID: 31579933
Thanks guys i managed to get it to work after reading the post listed

0

Featured Post

SuperAntiSpyware Licenses Discounted by 25% !

Exclusive offer to Experts Exchange Members!
Buy SuperAntiSpyware License(s) from us and save 25% on the regular purchase price.
- Includes Full SuperAntiSpyware Vendor Support Entitlements
- Your Subscription does not begin until you activate your license
- Buy for your friends

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My experience with Windows 10 over a one year period and suggestions for smooth operation
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question