Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Automation with Outlook
Hi all,
In my Outlook i have 3 appointments for a certain day, can somebody please explain to me why the first piece of code gives the correct result and the second piece just 1 appointment
&& Ok it works fine
ldDate={14/03/2002}
loApp=CREATEOBJECT("Outlook.application")
loSpace=loApp.GetNameSpace("MAPI")
oCal=loSpace.GetDefaultFolder(9).Items
oFound=oCal.Find("[Start]>='"+DTOC(ldDate)+" 00:01' AND [Start]<='"+DTOC(ldDate)+" 23:59'")
DO WHILE !ISNULL(oFound)
MESSAGEBOX("Afspraak "+oFound.Subject)
oFound=oCal.FindNext()
ENDDO
&& Just 1 appointment
ldDate={14/03/2002}
loApp=CREATEOBJECT("Outlook.application")
loSpace=loApp.GetNameSpace("MAPI")
oCal=loSpace.GetDefaultFolder(9)
oFound=oCal.Items.Find("[Start]>='"+DTOC(ldDate)+" 00:01' AND [Start]<='"+DTOC(ldDate)+" 23:59'")
DO WHILE !ISNULL(oFound)
MESSAGEBOX("Afspraak "+oFound.Subject)
oFound=oCal.Items.FindNext()
ENDDO
Thanks for any answers
Guillaume
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement