I use something like this to get the text from a shape inside PowerPoint:
s = ActiveWindow.Selection.SlideRange.Shapes("rec1").TextFrame.TextRange.Text
However, if the text has bold, underlined, resized (etc) text within the shape (meaning only certain words or phrases inside the shape), the .Text
property converts it all to plain text.
I am looking to grab the stylized markup (perhaps RTF) of the shape.
I see that if I copy the text (highlight, right-click, then pick COPY), and then PASTE it into WordPad, it preserves everything. However, I dont see a .RTFText
property (or anything similar) of the TextRange
that I can access programatically.
Does anyone know how to do this programatically (via VBA I suppose)?
Thanks -