Jump to content

Problems with filtering Outlook-appointments with Items.Restrict


Recommended Posts

Hi,

I have a C#-application that uses CDO to access Outlook 2003 to retrieve appointment items.

This is working just fine, but i need to apply a filter and i have the following that works:

using Outlook;

private Outlook.NameSpace m_NameSpace;

private Outlook.Explorer m_Explorer;

private Outlook.MAPIFolder m_Folder;

private Outlook.Folders m_Folders;

m_Folder = m_NameSpace.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);

Outlook.Items OutItems;

string tempFilter = "[billingInformation] = ''";

OutItems = m_Folder.Items

if (OutItems.Count > maxNoOfItems // Here i get the exception

{

}

... but when i replace m_Folder.Items with m_Folder.Items.Restrict(tempFilter);

i get an exception that reads "Input string was not in a correct format."

please help//Per-Martin

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...