PowerPoint2007 Shape Object On Focus Event and OnFocus out event

73 Views Asked by At

I have been searching, on capturing the event or some property that tells that a shape (text Shape Object) is onfocus. as this will help in capturing the keyboard event, so that if the text changes the rectangle width can be increased. as shown in the link http://s2.postimg.org/scxtx0ec9/Untitled.png

1

There are 1 best solutions below

6
Steve Rindsberg On

There aren't any such events. There's a SelectionChange event that's fired when the current selection changes; you can trap that then test to see what's currently selected (ie, Slides, Shapes, Text, etc) and react accordingly.

But is there some reason why you can't simply set the text container to automatically resize to fit text? That is, set the shape's .TextFrame.AutoSize property to ppAutoSizeShapeToFitText (Long = 1)