finding appointment in Outlook

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
 
R

Roady

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

It just struck my eye...
 
E

Esperanza

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
 

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