If i have texts(shapes) in my powerpoint. How can i modify my code NOT to create a new shape but overwrite the value inside it.
The code below creates a new shape. Any Ideas?
Private Sub test()
Dim xlApp As Object
Dim xlWorkBook As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = False
Set xlWorkBook = xlApp.Workbooks.Open("D:\ELE_powerpoint\book1.xlsx", True, False)
With xlWorkBook.ActiveSheet
xlWorkBook.sheets(1).Range("A2").Copy
End With
ActivePresentation.Slides(1).Shapes.Paste.Select
Set xlApp = Nothing
Set xlWorkBook = Nothing
End Sub