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();
API Reference
| Classic JavaDoc |
ItemsCollection.findItems
public ItemsIterator findItems(String pFilter)
public ItemsIterator findItems(String pFilter, boolean pIncludeRecurrences)
Search for a specific items in this collection.Parameters:
Returns:
pFilter | the find's filter. |
iterator over found items
Throws:ComponentObjectModelException |
public ItemsIterator findItems(String pFilter, boolean pIncludeRecurrences)
Search for items in this collection.Parameters:
Returns:
pFilter | the find's filter. |
pIncludeRecurrences | specify whether recurrent items are included or excluded. This is useful for searching recurrent appointments like anniversaries. |
iterator over found items
Throws:ComponentObjectModelException |
Community comments
You can use the findItems method to get the modified contacts since last sync time:
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
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