TextRange.Application 属性 (PowerPoint)

返回表示指定对象的创建者的 Application 对象。

语法

表达式应用

表达 一个代表 TextRange 对象的变量。

返回值

应用程序

示例

在此示例中, 演示文稿 对象传递给该过程。 该过程向演示文稿添加一张幻灯片,然后运行 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

另请参阅

TextRange 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。