Josh-Mason
Josh-Mason

Reputation: 319

How to determine the text of a shape in PowerPoint using VBA

I simply want to grab text from a shape and display it somewhere else (Textbox, MsgBox...)

I know this isn't correct but hopefully you can grasp the concept from this.

msgbox ("Do you want to overwrite " & slide1.slot1.value &, 36, "?")

slot1 = shapename

Any ideas?

Upvotes: 0

Views: 12482

Answers (1)

Steve Rindsberg
Steve Rindsberg

Reputation: 14810

Assuming that you're looking for the text in a shape named Slot1 on Slide 1 of the currently active presentation:

Msgbox ActivePresentation.Slides(1).Shapes("Slot1").TextFrame.TextRange.Text

Upvotes: 6

Related Questions