Programmatically setting a filter on a day/week/month view in Outlook 2003

  • Thread starter Thread starter sn
  • Start date Start date
S

sn

I am using OL2003 and am trying programmatically to set a filter on a
calendar view by editing the View.XML.

I have no problems settings filters programatically on table views in
the XML of table views, but for calendar views, the filter tag does
not seem to part of the XML, and the exact same filter works on table,
timeline, card and icon views.

When I change a day/week/month view manually in Outlook and set a
filter to only include items with the category 'b', then I would have
expected to find something like this in the View.XML:

<filter>"urn:schemas-microsoft-com:office:office#Keywords" = 'b'</
filter>

But the filter works, and only appointments having the category b is
shown in the view, but there is no filter tag in the xml for day/week/
month views.

When I try to set the filter programmatically by inserting filter tag
in the view.xml for a day/week/month view then the filter does not
work, ie. nothing is filtered in the view. This is probably related to
the fact that filters are not shown in the view.XML as I described
above.

The way I am setting filters programmatically works for table, card,
timeline and icon views, so it is not there the problem is.

Has anybody found a way to programmatically filter day/week/month
views? or is this a known bug in calendar views ?
 
Outlook Spy definitely shows a <filter> tag here in ActiveExplorer.CurrentView.XML. In XML, you need to use special character tokens for both kinds of quotation marks. See if this works better:

<filter>&quot;urn:schemas-microsoft-com:office:office#Keywords&quot; = &apos;b&apos;</filter>

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top