DASL Filter doesn't work when defined programatically

Status
Not open for further replies.
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
 
Hi,

don't know why the Outlook GUI Builder seems to display a wrong DASL expression.

Ich I use this one:

NOT " http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/boStatus" LIKE '%closed%'

Everything works fine.

Best

Tom

"escamoteur" <mail@burkharts.net> schrieb im Newsbeitrag news:5F20FE39-3DDF-4824-A456-1BCD97D275BE@microsoft.com...
> 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
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
P Prevent Outlook 2016 from using DASL filter Using Outlook 4
M DASL Filter function? Outlook VBA and Custom Forms 3
M DASL Filter function? Outlook VBA and Custom Forms 3
M Today(S) function in DASL Filter Outlook VBA and Custom Forms 1
M Today(S) function in DASL Filter Outlook VBA and Custom Forms 1
B How to create the customized Outlook SQL DASL for selected days? Outlook VBA and Custom Forms 2
U Drops filters for published views in public folders.Inserts DASL Outlook VBA and Custom Forms 1
R unable to filter tasks when start date is on or before today Using Outlook 3
O Filter-Query Builder-Description - what field name to use? Using Outlook 4
W Macro to Filter Based on Latest Email Outlook VBA and Custom Forms 6
Jennifer Murphy Spam filter not working Using Outlook 13
Y Filter unread emails in a search folder vba help Outlook VBA and Custom Forms 0
M How create a Rule to filter sender's email with more that one @ sign Using Outlook 1
M Sorting by Day in Date Column Advanced Filter BCM (Business Contact Manager) 1
Z Task Filter Not Working When I add too many criteria Using Outlook 0
M Filter Conversations - Filter Out Single Emails Outlook VBA and Custom Forms 3
B Looking to filter (or just find/search) for only messages that the sender has sent more than 1 messa Using Outlook 2
B Wanting to run a script that will filter any body that has a russian link in it. Outlook VBA and Custom Forms 5
C Filter/Search emails sent to internal Exchange address only Using Outlook 2
e_a_g_l_e_p_i Is there a good third party SPAM filter that intergrates with Outlook 2010 Using Outlook 7
P How to filter primary contacts in business contact manager BCM (Business Contact Manager) 0
O Outlook Web Access - how to disable spam filter Using Outlook 6
G How to filter by the format of an email address Using Outlook 6
S Mail filter recieved before the last 2 working days Using Outlook 1
Liza Creating a rule in outlook to filter messages Using Outlook 0
F Adding textbox filter to listbox? Outlook VBA and Custom Forms 2
Diane Poremsky Filter and Save Contacts to a CSV File Using Outlook 0
Diane Poremsky Filter and Save Contacts to a CSV File Using Outlook 0
Fozzie Bear HomeTab Email filter "Greyed Out" in Outlook 2013 Exchange Server Administration 3
W Filter condition "contains"/"doesn't contain" doesn't always work Using Outlook 10
B Conditional Formatting:How to use >1 value in a filter Using Outlook 7
J Outlook VBA for Email Filter Outlook VBA and Custom Forms 2
Emerogork How do I set up an "Incoming mail filter" Using Outlook 12
M Filter today's mail Using Outlook 2
M trying to disable junk email filter. completely. Using Outlook 4
J Task Filter for Status OR One Month Using Outlook 4
R Filter Views by Category Using Outlook 2
D Junk Mail filter Using Outlook 1
S Filter by accounts but communicate to all linked contacts BCM (Business Contact Manager) 1
D What is this SQL filter that is applied to my Inbox? Using Outlook 6
J Outlook Contacts: How to filter contact phone numbers from a cti request Using Outlook 1
H Two accounts, Junk email filter only works on one account, office 2010, pop3 Using Outlook 5
D How Would I Write This Filter? Using Outlook 3
N Filter end date works differently in OL'07/OL'10 vs OL'03? Hello?! Using Outlook 12
williamlambton Filter which removes Display Names from incoming emails. Using Outlook 2
J How to filter by address fragment (e.g. "@domain.com") with advanced find? Using Outlook 2
L Need a good email filter Using Outlook 2
P BCM Review & Filter BCM (Business Contact Manager) 1
M Create search folder filter that converts UTC time to local? Outlook VBA and Custom Forms 9
H Outlook 2007 SQL syntax to filter views of tasks and todo items Outlook VBA and Custom Forms 1

Similar threads

Back
Top