I am using the code below to search for all appointments after a certain date. Then I want to update the Categories of the appointments.
The problem is it adds a new appointment instead of Updating an existing one.
Any help highly appreciated.
Dim objOutlook As Outlook.Application
Dim objAppt As Outlook.AppointmentItem
Dim objRecurPattern As Outlook.RecurrencePattern
Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olAppointmentItem)
Dim ol As Object
Dim olns As Object
Dim objFolder As Object
Dim objAllAppoint As Object
Dim Appoint As Object
' Set the application object
Set ol = New Outlook.Application
' Set the namespace object
Set olns = ol.GetNamespace("MAPI")
' Set the default Calendar folder
Set objFolder = olns.GetDefaultFolder(olFolderCalendar)
Set objAllAppoint = objFolder.Items
' Loop through each Appointment
Dim st As String
Dim dt As Date
For Each Appoint In objAllAppoint
st = Format(Appoint.Start, "dd-mm-yyyy")
dt = "01-01-2004"
Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…