Results 1 to 6 of 6

Thread: Deleting an appointment in Outlook2000 with VB

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Berlin
    Posts
    44
    So, can't u just loop through the appointments, get property of startdate, if startdate is the one u are looking for, object.delete, else get next?
    This is just a guess, i used the same for Outlook Contacts, and that worked.
    VB 6.0
    VC++ 6.0
    ABAP

  2. #2
    Addicted Member djengiz's Avatar
    Join Date
    Jan 2001
    Location
    The Netherlands
    Posts
    153
    The problem is that i dont know how to do that.......

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Berlin
    Posts
    44
    Oh, ok. Sorry. I'll search for the app I wrote, and get back to you. Meanwhile, you can check http://www.win2000mag.com/Articles/I...rticleID=16207

    It might help ;-)
    VB 6.0
    VC++ 6.0
    ABAP

  4. #4
    Addicted Member djengiz's Avatar
    Join Date
    Jan 2001
    Location
    The Netherlands
    Posts
    153
    thnx for the tip! Hope you can send me your app.

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Berlin
    Posts
    44
    Ok, I can't find the app. Its on some server or other....
    But basically, it goes like this

    Private Sub Form_Load()
    Dim oOutlook As New Outlook.Application
    Dim oNameSpace As NameSpace
    Dim Appointment As Object
    Dim ocalItems As Items
    Dim AppointmentDate As String

    Set oNameSpace = oOutlook.GetNamespace("MAPI")
    Set ocalItems = oNameSpace.GetDefaultFolder(olFolderCalendar).Items
    AppointmentDate = "06.02.2002 10:30:00"
    Set Appointment = ocalItems.GetFirst

    Do While Not (Appointment Is Nothing)
    If Appointment.Start = AppointmentDate Then
    Appointment.Delete
    End If
    Set Appointment = ocalItems.FindNext
    Loop

    Set Appointment = Nothing
    Set ocalItems = Nothing
    Set oNameSpace = Nothing
    Set oOutlook = Nothing
    End Sub

    Now you just have put the Date and time in on which you want an Appointment deleted in AppointmentDate, either via textbox, or whatever.
    Hope this helps. Maybe I'll come up with something else....
    VB 6.0
    VC++ 6.0
    ABAP

  6. #6
    Addicted Member djengiz's Avatar
    Join Date
    Jan 2001
    Location
    The Netherlands
    Posts
    153
    THANKYOU!!!! That was what i was looking for. Ill try it tonight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width