finding appointment in Outlook

  • Thread starter Thread starter Esperanza
  • Start date Start date
E

Esperanza

Hello VBA Expert
I need to find an appointment in Outlook to update it.
My appointment is set to all day event.

If I used the following code, it cannot find the appointment. oApptItem will
equal nothing

Set oApptItem = oCalendarFolder.Items.Find("[subject] = " & strActivite & "
AND [Location]=" & strLocation & " AND [Start] = """ & tdystart & """" & "
AND [AlldayEvent]= true")



But if my appointment is NOT set to all day event the folloying code works :

' Set oApptItem = oCalendarFolder.Items.Find("[subject] = " &
strActivite & " AND [Location]=" & strLocation & " AND [Start] = """ &
tdystart & """")


How can I find my appointments set to all day event?

Thanks for your help !!
Esperanza
 
Not a real expert but isn't "AlldayEvent" case sensitive? If this is the
case is should be "AllDayEvent"

It just struck my eye...
 
Unfortunately,
even with the syntax AllDayEvent I got the same problem.
This is so weird, If the appointment is not set to AllDayEvent, I can find
the appointment by the subject and the location, If the appointment is set
to AllDayEvent, the program cannot find it.

Esperanza


Roady said:
Not a real expert but isn't "AlldayEvent" case sensitive? If this is the
case is should be "AllDayEvent"

It just struck my eye...

--
Roady
www.sparnaaij.net

-----

Esperanza said:
Hello VBA Expert
I need to find an appointment in Outlook to update it.
My appointment is set to all day event.

If I used the following code, it cannot find the appointment. oApptItem will
equal nothing

Set oApptItem = oCalendarFolder.Items.Find("[subject] = " & strActivite
&
"
AND [Location]=" & strLocation & " AND [Start] = """ & tdystart & """" & "
AND [AlldayEvent]= true")



But if my appointment is NOT set to all day event the folloying code
works
:

' Set oApptItem = oCalendarFolder.Items.Find("[subject] = " &
strActivite & " AND [Location]=" & strLocation & " AND [Start] = """ &
tdystart & """")


How can I find my appointments set to all day event?

Thanks for your help !!
Esperanza
 
Back
Top