DASL Filter doesn't work when defined programatically

E

escamoteur

Hi,

I have a strange problem.

I define a new View like:

void CreateViews()
{
string FilterActiveBOs = GetResourceString("ViewActiveOpportunities");
Outlook.Views BOViews = BO_Folder.Views;

if (BOViews[GetResourceString("ViewNameActiveBO")] == null)
{
Outlook.View activeView = BOViews.Add(GetResourceString("ViewNameActiveBO"),
Microsoft.Office.Interop.Outlook.OlViewType.olTableView,
Microsoft.Office.Interop.Outlook.OlViewSaveOption.olViewSaveOptionThisFolderEveryone);
activeView.XML = FilterActiveBOs;
activeView.Save();
activeView.Apply();

}

As Filter I defined:
"http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/boStatus" <> 'closed'

But entries that contain "closed" are still displayed

No The strange part. If I built a View via the Outlook GUI that has excatly the same filer expression it works.

Any idea?
Best
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top