Microsoft KB Archive/245260

= How to Set Up Site Server Search to Use Custom Microsoft Office Properties =

Article ID: 245260

Article Last Modified on 5/15/2006

-

APPLIES TO


 * Microsoft Site Server 3.0 Standard Edition
 * Microsoft Site Server 3.0 Commerce Edition

-



This article was previously published under Q245260



SUMMARY
This article covers the steps needed to create a custom search query based on the properties of Microsoft Office documents.



MORE INFORMATION
 Start Microsoft Word. Either create or open the document you wish to tag, and select Properties from the File menu. Under the Custom tab, type CustomProperty for the name, leave the Type as Text, and type CustomPropertyValue as the value. Click Add and Close. Save the document and close Microsoft Word. Create a new search catalog called CustomPropertyCatalog. Do a file crawl against the directory containing the document modified above, but don't start the crawl yet. Expand the catalog under Catalog Build Server and select Schema. Click Add, and fill out the page as follows:

If prompted, create a custom schema.

 Now that the property has been added to the schema, perform a full build on the catalog. The next two steps modify the page that displays your search results. Please refer to the online documentation and the Knowledge Base articles below for more information on how to create this page.

</li>  Modify your search results page and define a column for the custom property similar to the following:

Set objQuery = Server.CreateObject ("MSSearch.Query") objQuery.Catalog = "CustomPropertyCatalog" objQuery.Query = "#Filename *.doc" objQuery.DefineColumn "CustomProperty (DBTYPE_STR | DBTYPE_BYREF)= D5CDD505-2E9C-101B-9397-08002B2CF9AE CustomProperty" objQuery.Columns = "Title, DocAddress, Description, Rank, CustomProperty"

This query returns all Microsoft Word files in our catalog and also explicitly retrieves the value of the CustomProperty property.

</li>  Changing the query text to the following:

objQuery.Query = "@CustomProperty CustomPropertyValue"

It only return documents within the catalog where CustomProperty is set to CustomPropertyValue. </li></ol>

243724 An Example Search Results Page Utilizing a SQL-Style Query for Site Server Search

197607 Office Custom Property Is Not Searchable

Keywords: kbhowto KB245260

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.