Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Go Back  Xtreme Visual Basic Talk > > > Removing appointment items in Outlook Calendar via VB 2010


Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2012, 01:02 AM
jjb1989 jjb1989 is offline
Newcomer
 
Join Date: Sep 2012
Posts: 2
Default Removing appointment items in Outlook Calendar via VB 2010


Hi guys,

I am creating a WPF window that would take two date values and checks whether already allocated annual leave appointments have been set to and in between those two dates in Outlook calendar. The dates are input via DatePicker controls, one for the start date, the other for end date. If they do exist, I wish to remove those appointments. This is the code I have so far. Please note that it is far from accurate or complete and clearly needs bits and pieces which are missing.

Code:
 Public Sub RemoveLeave()

        Dim removalDates As New Collection

        Dim calendar As Outlook.MAPIFolder = _
             tempApp.Session.GetDefaultFolder( _
                Outlook.OlDefaultFolders.olFolderCalendar)

        Dim calendarItems As Outlook.Items = calendar.Items

        Dim item As Outlook.AppointmentItem = TryCast( _
            calendarItems("Annual Leave"), Outlook.AppointmentItem)

        Dim counter As Date = fromDate

        Do Until counter = toDate.Date.AddDays(1)
            removalDates.Add(counter)
            counter = counter.AddDays(1)
        Loop
    End Sub
Please advise how much further I can modify this code to accomplish the task. Thanks.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010 Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
 
Removing appointment items in Outlook Calendar via VB 2010
Removing appointment items in Outlook Calendar via VB 2010
 
-->