返回 IHTMLElementCollection 对象集合,该集合代表当前文档中所有 Java 小程序的集合。
expression.applets
expression 必选。返回 DispFPHTMLDocument 对象的表达式。
此集合先按名称索引,再按标识符索引。如果发现相同的名称,则返回具有该名称的项目的集合。相同名称的集合随后必须按位置序号进行引用。
下列示例返回对 Java 小程序集合的引用并显示当前文档中所有 Java 小程序的名称。
Sub AppletsCollection()
'Returns the collection of all applets in the active document.
Dim objApp As FrontPage.Application
Dim objAll As IHTMLElementCollection
Set objApp = FrontPage.Application
'Reference the applets collection.
Set objAll = FrontPage.ActiveDocument.applets
For i = 0 To objAll.Length - 1
'Display names of all applets in collection.
MsgBox "Element tag name: " & objAll.Item(i).Name
Next i
End Sub