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
精彩评论