开发者

How to get value from textfield in PowerPoint into Excel?

How could this be done?

The PowerPoint application is running and the textfield I want to get the value from is on slide 3.

I've tried this without any success:

Dim PPApp As PowerPoint.Application

Set PPApp = GetObject(, "PowerPoint.Application")

Range("A20").Value = PPApp.Presentation.Slide3.txtMyTextField.Value

Anyone know the right way to do this? (I've also added a reference to PowerPoint in the 开发者_StackOverflowExcel file)


This assumes I've got a single TextBox ActiveX Control on my Slide 1.

Sub GetTextBoxText()
    Dim ap As Presentation: Set ap = ActivePresentation
    Dim tb As TextBox: Set tb = sl.Shapes(1).OLEFormat.Object
    Debug.Print tb.Text
End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜