473,722 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Finding an outlook appointment using ".find" fuction

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.MAPIFol der = oNS.GetDefaultF older(Outlook.O lDefaultFolders .olFolderCalend ar
Dim oItems As Outlook.Items = oCalendar.Item
oItems.Sort("St art"
oItems.IncludeR ecurrences = Tru
Dim oAppt As Outlook.Appoint mentItem = 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 wor

Your help is greatly appriciate
Thanks
Ori :)
Nov 20 '05 #1
2 10098
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 = "[LastModificatio nTime] > '" & 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 = "[LastModificatio nTime] > '" & Format(Now, "ddddd h:nn AMPM")
& "'"

or if you prefer (unchecked):

sFilter = "[LastModificatio nTime] > '" & Now.ToString("d dddd h:nn AMPM")
& "'"

Hope this helps
Jay

"Ori :)" <an*******@disc ussions.microso ft.com> wrote in message
news:4F******** *************** ***********@mic rosoft.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.MAPIFol der = oNS.GetDefaultF older(Outlook.O lDefaultFolders .olFolderCalend ar) Dim oItems As Outlook.Items = oCalendar.Items
oItems.Sort("St art")
oItems.IncludeR ecurrences = True
Dim oAppt As Outlook.Appoint mentItem = 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 :)

Nov 20 '05 #2
Thanks Jay ! will give it a try ! :)
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3226
by: salem.ganzhorn | last post by:
#include <map> #include <iostream> using namespace std; int main( int argc, const char * argv ) {
1
2311
by: P-O | last post by:
Hi! I want to open the "Find" window in MSIE to allow a user to find text on the page they are looking at (Ctrl+F). Any sggestions for the easiest possible way? /P-O
2
2213
by: Praveen | last post by:
In the ISPF editor I am using, for a particullar PO Dataset I am getting the result of FIND statement narrowed down to the colums 48-56. i.e. if I give "FIND 'TO' ALL", the result I am getting as "CHARS 'TO' - found 239 times within columns 48 to 56". Please guide me as to how to make this PDS back to normal so that the FIND command processes the whole 1 TO 80. Thank you for the valuable time.
2
12204
by: galsaba | last post by:
Is there a "Find" fucntion in Access? I found this is Excell Find (find_text, within_text, start_num). Where can i find a similar function is Access? galsaba
3
1500
by: Rudy Ray Moore | last post by:
Hi guys, I often use the "Find" (aka CTRL-F) tool in "Visual Studio .net 2003 7.1 c++". I noticed that that dialog box does not go away when I perform a search (it stays on the screen). This is different from the behavior of VS6. I find this frusterating because a mouse click is required to close the window (I cannot ALT-TAB back to the find window to press ESC).
2
7661
by: Lenonardo | last post by:
Hi. I'm writing a VB.Net application to update multiple Excel Worksheets. I'm using late binding (i.e. all variables are objects + use createobject) I develop the application on an XP machine with Excel 2002 (version 10.0) installed - and the code works fine. I then test the code on a laptop running Excel 2000 (version 9.0) and it
8
4206
by: clyfish | last post by:
In cmd, I can use find like this. C:\>netstat -an | find "445" TCP 0.0.0.0:445 0.0.0.0:0 LISTENING UDP 0.0.0.0:445 *:* C:\> And os.system is OK. TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
1
1648
by: C++ Newbie | last post by:
I want to recursively search for subdirectories containing filename1 only, but not filename1 & filename2. I tried using the following csh command but it doesn't work: find ./ -name d3hsp | sed 's/filename1//' | grep -v `find ./ -name d3kil | sed 's/filename2//'` Any suggestions?
3
2188
by: =?ISO-8859-1?Q?Andreas_M=FCller?= | last post by:
Hi! (Python 2.2.3 if this is relevant :-) I have a list of objects with, lets say, the attributes "ID", "x" and "y". Now I want to find the index of list element with ID=10. Of course I can loop through the list manually, but is there a construct like
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6681
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.