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
Asked
Active
Viewed 70 times
1 Answers
0
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)

Steve Rindsberg
- 14,442
- 1
- 29
- 34
-
If you just notice the image link. there are two shapes 1) a text box and 2) a Rectangle Box. what i need was to increase the width of the rectangle. when the text is added. – Sabih Ahmed Khan Jul 01 '14 at 10:01
-
You want the width of the rectangle to change as text is added to the text box, then? I suspect you'll need to trap the selection change event then. – Steve Rindsberg Jul 01 '14 at 13:40
-
yes you are right, want the width of the rectangle to change as text is added to the text box. I handled it some how. thanks. – Sabih Ahmed Khan Jul 03 '14 at 09:18
-
Since StackOverflow is about helping one another solve problems, how about sharing your solution? – Steve Rindsberg Jul 03 '14 at 20:39
-
http://stackoverflow.com/questions/22815084/catch-mouse-events-in-powerpoint-designer-through-vsto – Sabih Ahmed Khan Jul 11 '14 at 10:13
-
the last link helped me to capture the events – Sabih Ahmed Khan Jul 11 '14 at 10:14