applets Property

Microsoft FrontPage Visual Basic

applets Property

Returns an IHTMLElementCollection object that represents the applets attached to a specified document.

expression.applets

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example takes an FPHTMLDocument object and returns a String array that represents the value of the id attribute for each of the APPLET elements in the specified document.

    Function GetApplets(objDoc As FPHTMLDocument) As String()
    Dim objApplet As IHTMLElement
    Dim intCount As Integer
    Dim strApplets() As String

    If objDoc.applets.Length > 0 Then
        ReDim strApplets(objDoc.applets.Length - 1)
        For intCount = 0 To objDoc.applets.Length - 1
            Set objApplet = objDoc.applets.Item(intCount)
            strApplets(intCount) = objApplet.Id      
        Next
    End If

    GetApplets = strApplets
End Function
  

Use the following example to call the preceding function.

    Sub CallGetApplets()
    Dim strApplets() As String
    Dim intCount As Integer
    
    On Error Resume Next
    
    strApplets = GetApplets(ActiveDocument)
    
    For intCount = 0 To UBound(strApplets)
        MsgBox strApplets(intCount)
    Next
End Sub