Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / April 2005

Tip: Looking for answers? Try searching our database.

Application.AdvancedSearch - namespace for Categories?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dawolfden@gmail.com - 26 Apr 2005 14:28 GMT
I'm modifying a VBA script which creates searchfolders from a
user-defined label to categories. I thought the namespace for that
filter would be urn:schemas-microsoft-com:office:office#Category but
this does nothing:

strFilter = "urn:schemas-microsoft-com:office:office#Category LIKE '%/"
& sqf & "/%'"

Any idea what the filter string would be to select on a specific
category?
Ken Slovak - [MVP - Outlook] - 26 Apr 2005 14:43 GMT
Use "urn:schemas-microsoft-com:office:office#Keywords".

The easiest trick to getting the property tag you need to use is by using
the customize current view dialog and the Filter button. In that dialog you
can set up your filter in the Advanced tab and then look at what was
generated in the SQL tab.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> I'm modifying a VBA script which creates searchfolders from a
> user-defined label to categories. I thought the namespace for that
[quoted text clipped - 6 lines]
> Any idea what the filter string would be to select on a specific
> category?
Westbroek - 26 Apr 2005 15:07 GMT
Thanks Ken, excellent tip!

I must be off somewhere still. Using the following the searchfolder gets
created but returns no messages:

   strFilter = "urn:schemas-microsoft-com:office:office#Keywords LIKE '%/"
& sqf & "/%'"

   Set objSrch = Application.AdvancedSearch(strScope, strFilter, True,
strTag)

Does that look right?

> Use "urn:schemas-microsoft-com:office:office#Keywords".
>
> The easiest trick to getting the property tag you need to use is by using
> the customize current view dialog and the Filter button. In that dialog
> you can set up your filter in the Advanced tab and then look at what was
> generated in the SQL tab.
Ken Slovak - [MVP - Outlook] - 27 Apr 2005 15:18 GMT
I'd probably do it something like this:

  strFilter = Chr(34) & "urn:schemas-microsoft-com:office:office#Keywords"
& Chr(34)
  strFilter = strFilter & " LIKE '%/" & sqf & "/%'"

Your category is "/sqf/", where sqf is the value of that variable?

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Thanks Ken, excellent tip!
>
[quoted text clipped - 8 lines]
>
> Does that look right?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.