Ori,
For a list of resources on using Outlook from VB.NET:
http://www.microeye.com/resources/res_outlookvsnet.htm
For help & information on programming Outlook (mostly VB6, some VB.NET):
http://www.outlookcode.com/
Some samples of using Outlook with VB.NET:
http://msdn.microsoft.com/office/def...OLOMwVBNET.asp
A sample COM Add-in for Outlook written in VB.NET:
http://msdn.microsoft.com/library/de...hatsNew2k3.asp
Did you check the online help for specifics on using dates with the Find
method?
It needs to be in the following (VBA) format:
sFilter = "[LastModificationTime] > '" & Format("1/15/99 3:30pm", "ddddd
h:nn AMPM") & "'"
Remember that you can still use the VBA/VB6 Format function in .NET so it
would be:
sFilter = "[LastModificationTime] > '" & Format(Now, "ddddd h:nn AMPM")
& "'"
or if you prefer (unchecked):
sFilter = "[LastModificationTime] > '" & Now.ToString("ddddd h:nn AMPM")
& "'"
Hope this helps
Jay
"Ori :)" <an*******@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
I am writing an application to retrieve appointments from Outlook, I have
the appointment items sorted by "Start" field and now I want to find the first record which's "Start"
value is later than now (future appointment)
The relevant piece of my current code:
Dim oCalendar As Outlook.MAPIFolder =
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFo lderCalendar) Dim oItems As Outlook.Items = oCalendar.Items
oItems.Sort("Start")
oItems.IncludeRecurrences = True
Dim oAppt As Outlook.AppointmentItem = oItems.Find("[Subject] =
""Flight, CO 0516 2:10pm""")
What is the syntax to replcae the ("[Subject] = ""Flight, CO 0516
2:10pm""") in the last line to reflect what I need ? something like ".Find("[Start] >" & Now.ToString)" - which does not work
Your help is greatly appriciated
Thanks !
Ori :)