MetaTags Property

Microsoft FrontPage Visual Basic

Returns the MetaTags collection for the specified WebFile object.

expression.MetaTags

expression    Required. An expression that returns a WebFile object.

Example

The following example iterates through the META tags collection in each file in the active Web site and concatenates the file names and META tag names into a string called myReturnInfo.

Private Sub GetMetaTagInfo_Click()
    Dim myWeb As WebEx
    Dim myFiles As WebFiles
    Dim myFile As WebFile
    Dim myMetaTags As MetaTags
    Dim myMetaTag As Variant
    Dim myFileName As String
    Dim myMetaTagName As String
    Dim myReturnInfo As String

    Set myWeb = ActiveWeb
    Set myFiles = myWeb.RootFolder.Files

    With myWeb
         For Each myFile In myFiles
             Set myMetaTags = myFile.MetaTags
             For Each myMetaTag In myMetaTags
                     myFileName = myFile.Name
                     myMetaTagName = myMetaTag
                     myReturnInfo = myFileName & ": " _
                         & myMetaTagName
             Next
         Next
    End With
End Sub