返回一个 Application 对象,该对象代表指定对象的创建者。
expression.Application
expression 必选。该表达式返回“应用于”列表中的对象之一。
本示例中,一个 Presentation 对象被传送至某过程。此过程在演示文稿中添加一张幻灯片,然后将其保存在 Microsoft PowerPoint 运行的文件夹中。
Sub AddAndSave(pptPres As Presentation)
pptPres.Slides.Add 1, 1
pptPres.SaveAs pptPres.Application.Path & "\Added Slide"
End Sub
本示例显示在当前演示文稿的第一张幻灯片上创建每个链接的 OLE 对象的应用程序的名称。
For Each shpOle In ActivePresentation.Slides(1).Shapes
If shpOle.Type = msoLinkedOLEObject Then
MsgBox shpOle.OLEFormat.Application.Name
End If
Next