From: Michael F
Sent: Thursday, March 16, 2000 12:40 AM
To: Hollis@outlookbythesound.com
Subject: MS Index server
Hello,
Sorry to bother you, but from reading the index server newsgroup, you seem
to have a really good grasp of it. I have a question if you can help me with it.
How does one do date compares with meta tag which contain dates?
For instance if I had the following meta tag:
<meta name="StoryDate" content="02/11/1999">
For some reason when I try to do a query like this:
@StoryDate > "1/2/1999"
or
@StoryDate > "1/2/1999" AND @StoryDate < "2/2/1999"
It errors out. Also, when doing a sort by, if I specify to sort by that
StoryDate meta tag, the sort is completely off, whether I do a Query.SortBy
StoryDate[d] or [a].
Also, would you know how to be able to search for a meta tag that have
multiple values?
I haven't done anything on metatags or dates, but I found the following message in the Microsoft.Public.FrontPage.Client newsgroup.
==========
From: "Joe Rohn"
Subject: Re: HELP !! META TAGS
Date: Thu, 17 Feb 2000 17:21:00 -0500
Newsgroups: microsoft.public.frontpage.client
Hi Todd,
It isn't really all that hard to do. One way to do it is to open your page
in HTML mode and manually add them. You should at a minimum do meta tags for
description and keywords. (There's many more) All you would need to do is to
replace the description and keywords with your own. You would do these in
the head section immediately following the Title.
<meta name="description" content="Something to describe your page">
<meta name="keywords" content="keyword phrase 1, keyword2, 2nd keyword
phrase, etc.">
Another way do do it (In FP2K anyway, don't remember if it is the same in
FP98) right click on the page that you want to add them to | under page
properties choose custom | choose add | under "name" type description |
under value type the description you want | click OK and OK again and you
have now added a Meta Tag for description
Do the same process as above for your keywords and phrases. There is some
disagreement as to whether or not you should separate your keywords and
phrases with commas. Personally I don't believe that you need commas between
them, but others will say that you should.
HTH
--
Joe
================================
"Todd" wrote in message
> Could someone point me in the right direction? I am now ready to make 2 of
> my sites show up in a search engine. I know i need a metatag. BUT. i dont
> understand where to put it or how to make it .. i have found lots of
> programs to make one. but am still confused. is there a good program that
> will do all this?
> Thanks for you help.
> Todd
>
================
That would seem to indicate that you search for metatags in the same way as you would for custom properties of a page. Further, searching the MSDN Library, using "metatag and search", produces the following document:
"Working with Document Properties" from the Microsoft Office 2000/Visual Basic Programmer's Guide.
(See the rather long quote at the end of this page.)
and the following from another document:
================
The following statement returns the contents of a META tag that exists on a web page in the active web, and demonstrates the PropertyKey As String argument.
myMetaTagContents _
= ActiveWeb.RootFolder.Files.Item(0).MetaTags.Item("generator")
Note On the HTML tab in Page view, FrontPage displays this meta tag as initially capped (Generator). However, the value of the meta tag item is all lowercase letters (generator). If you capitalize the first letter of a META tag name and use it as search criteria in a Visual Basic program, your search will fail.
================
This should get you started.

-----Original Message-----
From: Michael F
Sent: Thursday, March 16, 2000 12:40 AM
To: Hollis@outlookbythesound.com
Subject: MS Index server
Hello,
Sorry to bother you, but from reading the index server newsgroup, you seem
to have a really good grasp of it. I have a question if you can help me with it.
How does one do date compares with meta tag which contain dates?
For instance if I had the following meta tag:
<meta name="StoryDate" content="02/11/1999">
For some reason when I try to do a query like this:
@StoryDate > "1/2/1999"
or
@StoryDate > "1/2/1999" AND @StoryDate < "2/2/1999"
It errors out. Also, when doing a sort by, if I specify to sort by that
StoryDate meta tag, the sort is completely off, whether I do a Query.SortBy
StoryDate[d] or [a].
Also, would you know how to be able to search for a meta tag that have
multiple values?
If I wanted to have something like the following:
<meta name="Category" content="Politics,Sports,Entertainment">
Would that be the correct way, or would it be this:
<meta name="Category content="Politics">
<meta name="Category content="Sports">
<meta name="Category content="Entertainment">
And if I did a search like:
@Category Sports
or
@Category Sports AND @Category Entertainment
Are either of those the correct way of doing it?
Any help would be greatly appreciated.
Michael F

"Working with Document Properties" from the Microsoft Office 2000/Visual Basic Programmer's Guide.
FrontPage also does not use the DocumentProperties collection to store the built-in and custom properties displayed in its Page Properties dialog box (File menu). In FrontPage, built-in and custom properties are stored in the MetaTags and Properties collections of a WebFile object. For more information about working with the FrontPage object model, see Chapter 5, "Working with Office Applications."
Outlook does not provide a Document Properties dialog box from the File menu like the other Office applications do.
You access the DocumentProperties collection by using the BuiltInDocumentProperties and CustomDocumentProperties properties of an Office document. For an example that prints all built-in and custom document properties for an Office document to the Immediate window, see the PrintAllDocProperties procedure in the modDocumentPropertiesCode module in the ExcelExamples.xls file in the ODETools\V9\Samples\OPG\Samples\CH06 subfolder on the Office 2000 Developer CD-ROM.
Note The BuiltInDocumentProperties property returns a collection that contains properties that may apply only to certain Office applications. If you try to return the value of these properties in the wrong context, an error occurs. The sample code shows how to trap this error and continue to identify all the properties that are valid in a given context.
The following code sample shows how to determine the value of a built-in document property. The GetBuiltInProperty procedure accepts an Office document object (Workbook, Document, or Presentation) and a property name and returns the value of the built-in property, if available:
Function GetBuiltInProperty(objDoc As Object, _
strPropname As String) As Variant
' This procedure returns the value of the built-in document
' property specified in the strPropName argument for the Office
' document object specified in the objDoc argument.
Dim prpDocProp As DocumentProperty
Dim varValue As Variant
Const ERR_BADPROPERTY As Long = 5
Const ERR_BADDOCOBJ As Long = 438
Const ERR_BADCONTEXT As Long = -2147467259
On Error GoTo GetBuiltInProp_Err
Set prpDocProp = objDoc.BuiltInDocumentProperties(strPropname)
With prpDocProp
varValue = .Value
If Len(varValue) <> 0 Then
GetBuiltInProperty = varValue
Else
GetBuiltInProperty = "Property does not currently have a value set."
End If
End With
GetBuiltInProp_End:
Exit Function
GetBuiltInProp_Err:
Select Case Err.Number
Case ERR_BADDOCOBJ
GetBuiltInProperty = "Object does not support BuiltInProperties."
Case ERR_BADPROPERTY
GetBuiltInProperty = "Property not in collection."
Case ERR_BADCONTEXT
GetBuiltInProperty = "Value not available in this context."
Case Else
End Select
Resume GetBuiltInProp_End:
End Function
The GetBuiltInProperty procedure is available in the modDocumentPropertiesCode module in ExcelExamples.xls in the ODETools\V9\Samples\OPG\Samples\CH06 subfolder on the Office 2000 Developer CD-ROM.
Note For a complete list of built-in document properties, search the Microsoft Office Visual Basic Reference Help index for "DocumentProperty object."
You can determine the value of an existing custom document property by using the same techniques as those illustrated in the previous code example. The only difference is that you would use the Office document's CustomDocumentProperties collection to return the DocumentProperty object you were interested in.
You use the Add method of the CustomDocumentProperties collection to add a custom DocumentProperty object to the DocumentProperties collection. When you add a custom property, you specify its name, data type, and value. You can also link a custom property to a value in the Office document itself. When you add linked properties, the value of the custom property changes when the value in the document changes. For example, if you add a custom property linked to a named range in an Excel spreadsheet, the property will always contain the current value of the data in the named range.
The following procedure illustrates how to add both static and linked custom properties to the DocumentProperties collection. It is essentially a wrapper around the Add method of the DocumentProperties collection that includes parameter validation and deletes any existing custom property before adding a property that uses the same name.
Function AddCustomDocumentProperty(strPropName As String, _
lngPropType As Long, _
Optional varPropValue As Variant = "", _
Optional blnLinkToContent As Boolean = False, _
Optional varLinkSource As Variant = "") _
As Long
' This procedure adds the custom property specified in the strPropName
' argument. If the blnLinkToContent argument is True, the custom
' property is linked to the location specified by varLinkSource.
' The procedure first checks for missing or inconsistent input parameters.
' For example, a value must be provided unless the property is linked, and
' when you are using linked properties, the source of the link must be provided.
Dim prpDocProp As DocumentProperty
' Validate data supplied in arguments to this procedure.
If blnLinkToContent = False And Len(varPropValue) = 0 Then
' No value supplied for custom property.
AddCustomDocumentProperty = ERR_CUSTOM_LINKTOCONTENT_VALUE
Exit Function
ElseIf blnLinkToContent = True And Len(varLinkSource) = 0 Then
' No source provided for LinkToContent scenario.
AddCustomDocumentProperty = ERR_CUSTOM_LINKTOCONTENT_LINKSOURCE
Exit Function
ElseIf lngPropType < msoPropertyTypeNumber Or _
lngPropType > msoPropertyTypeFloat Then
' Invalid value for data type specifier. Must be one of the
' msoDocProperties enumerated constants.
AddCustomDocumentProperty = ERR_CUSTOM_INVALID_DATATYPE
Exit Function
ElseIf Len(strPropName) = 0 Then
' No name supplied for new custom property.
AddCustomDocumentProperty = ERR_CUSTOM_INVALID_PROPNAME
Exit Function
End If
Call DeleteIfExisting(strPropName)
Select Case blnLinkToContent
Case True
Set prpDocProp = ActiveWorkbook.CustomDocumentProperties _
.Add(Name:=strPropName, LinkToContent:=blnLinkToContent, _
Type:=lngPropType, LinkSource:=varLinkSource)
ActiveWorkbook.Save
Case False
Set prpDocProp = ActiveWorkbook.CustomDocumentProperties. _
Add(Name:=strPropName, LinkToContent:=blnLinkToContent, _
Type:=lngPropType, Value:=varPropValue)
End Select
End Function
The AddCustomDocumentProperty procedure is available in the modDocumentPropertiesCode module in ExcelExamples.xls in the ODETools\V9\Samples\OPG\Samples\CH06 subfolder on the Office 2000 Developer CD-ROM.
Important When you programmatically add a custom property to the DocumentProperties collection and the property is linked to a value in the underlying Office document, you must use the document's Save method, as illustrated above, before the property value will be correctly reflected for the new DocumentProperty object.