Moyosoft Products | Services | Download | Contact us    
Java Outlook Connector
Products  >  Java Outlook Connector  >  API Reference    
API Reference
   
Overview  |  
Classic JavaDoc

ItemsCollection.findItems

public ItemsIterator findItems(String pFilter)

Search for a specific items in this collection.

Parameters:
pFilter   the find's filter.

Returns:
iterator over found items

Throws:
ComponentObjectModelException   

public ItemsIterator findItems(String pFilter, boolean pIncludeRecurrences)

Search for items in this collection.

Parameters:
pFilter   the find's filter.
pIncludeRecurrences   specify whether recurrent items are included or excluded. This is useful for searching recurrent appointments like anniversaries.

Returns:
iterator over found items

Throws:
ComponentObjectModelException   

Community comments


Find modified contacts since a specific time
Vote up  |  Vote down
You can use the findItems method to get the modified contacts since last sync time:

Outlook outlook = new Outlook();
OutlookFolder folder = outlookApplication.getDefaultFolder(FolderType.CONTACTS);

ItemsIterator it = folder.getItems().findItems("[LastModificationTime] > '06/22/2009 11:00 AM'");

while(it.hasNext())
{
// ...
}

outlook.dispose();

Filter string format
Vote up  |  Vote down
The filter string is directly interpreted by Outlook. For more information on the format, look at the Microsoft Outlook documentation:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;201081

Search subject containing keyword
Vote up  |  Vote down
You can use DASL SQL query:

String filter = "@SQL=\"http://schemas.microsoft.com/mapi/proptag/0x0037001f\" like '%hello%'";
ItemsIterator items = inbox.getItems().findItems(filter);

More information:
http://msdn.microsoft.com/en-us/library/bb220369(v=office.12).aspx


Powered by JavaDocPlus