Appointment Item Conflicts not being detected.

L

liyuhua

Hi

I have the following code that cycles through all the appointments in
my folder and uses the Conflicts property of the appointmentItem to
detect conflicts.

However, the number of conflicts returned is always 0, even if 2
appointments are set to have the same time and date.

Please advise as to what is wrong...

Dim appointmentFolder As Outlook.MAPIFolder = _

m_olOutlook.GetNamespace(Type:="MAPI").GetDefaultFolder(FolderType:=Outlook.OlDefaultFolders.olFolderCalendar)

Dim appointmentItems As Outlook.Items =
appointmentFolder.Items
Dim m_olAppointmentItem As Outlook.AppointmentItem
appointmentItems.Sort("[Start]")

For Each m_olAppointmentItem In appointmentItems
Dim numConflicts As Integer =
m_olAppointmentItem.Conflicts.Count
DebugWriter("Appointment " +
m_olAppointmentItem.Subject + " has " + CType(myAppt.Conflicts.Count,
String) + " conflicts")
Next m_olAppointmentItem
 

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