Find an item in Outlook from Access

A

Andy

Hi - I am trying to locate an item in Outlook Calendar folder using Acess VBA.
I know the subject and the date of the appointment and that it is an All Day
Day Event. Can anyone help with the code ?

Something like :-

Dim olApp As Outlook.Application
Dim objCalendar As Object
Dim objAppointment As Object
Dim CalEntryID As Variant
Dim SQLcmd As String
Dim StaffID As Variant
Dim olNS As NameSpace
Dim olFolder As MAPIFolder
Dim olDataFolder As MAPIFolder
Dim olItem As AppointmentItem
Dim FDO as Variant

Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI") ' open the MAPI Namespace

Set olFolder = olNS.GetDefaultFolder(olFolderCalendar)

FDO = Format(09/03/2006, "dd/mm/yyyy")

Set objAppointment = olFolder.Items.Find(Start = FDO AND Subject = "Long
Meeting" AND AllDayEvent = Yes)

or similar ????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top