Finding DASL Property Names

The LINQ-to-DASL provider of the Office Interop API Extensions provides a very limited set of mappings between its query types and their associated DASL properties. We didn’t have the time to add them all and we didn’t know which properties (besides the obvious ones like Subject and DateReceived) users would be most likely to use in their queries. Instead, we created an extensibility mechanism (the OutlookItemPropertyAttribute) that allowed users to add their own mappings to DASL properties. Now the problem becomes, where do we find these DASL property names?

You can find some of the property names amongst the MSDN Office and Exchange documentation, but many properties are missing and sometimes the documentation is misleading (e.g. a listed property may work when querying Exchange but not Outlook). Outlook supports another query syntax (Jet) that uses a different set of property names, making the documentation even more confusing.

The best approach that I have found is to go directly to the source. Outlook actually has a built-in DASL query builder, if only you know how to find it. Here’s the trick: start with the View : Current View : Customize Current View menu item.

This displays the Customize View Messages dialog.

Next, click the Filter button.

The filter dialog allows you to filter messages in a folder by a variety of criteria. Select the Advanced tab.

Now use the Field button to select the Outlook item property you are interested in.

You can then select the condition and a value. Click the Add to List button to add the criteria to the filter.

Finally, select the SQL tab to see the DASL.

In this case, we see that the DASL property associated with the Modified time of an appointment is "DAV:getlastmodified". To cut and paste the query string elsewhere (e.g. to Notepad, so you can compare the query string to the debug output of your LINQ-to-DASL query), check the box at the bottom of the tab.

This post was migrated from my MSDN blog, Visual Studio Tools and Anything Else I Can Think Of, and written as a Microsoft employee.

2014

Back to Top ↑

2012

Back to Top ↑

2008

Finding DASL Property Names

1 minute read

The LINQ-to-DASL provider of the Office Interop API Extensions provides a very limited set of mappings between its query types and their associated DASL prop...

Debugging LINQ-to-DASL Queries

3 minute read

When your LINQ-to-DASL queries do not return the results you expect, how do you determine where the problem is?  The issue could be that the query simpl...

LINQ to DASL Walkthrough

3 minute read

Now that the Office Interop API Extensions have been released, I thought I would post a complete walkthrough of a simple LINQ to DASL application. Let's star...

Office Interop API Extensions Now Available!

less than 1 minute read

As announced in Andrew Whitechapel’s post, version 1.0 of the VSTO Power Tools have been released! One of those tools is the Office Interop API Extensions, a...

Using LINQ with the Office Object Model

3 minute read

In my last post I talked about LINQ to DASL, a LINQ provider that converts query expressions into their DASL equivalent in order to efficiently filter item c...

Back to Top ↑

2007

VSTO at Portland Code Camp v3.0

less than 1 minute read

Yesterday I gave a presentation on VSTO at the third annual Portland Code Camp. I demonstrated an Outlook 2007 add-in that used Outlook Form Regions, WCF, an...

Back to Top ↑