From: doodleM on
Problem faced in Powerpoint 2007

1) I have a Shape in my current slide with some paragraphs
2) Creates a newShape as Duplicate of my Orginal Shape
(newShape=orgShape.Duplicate) and Set the top, left of newShape as orgShape
with some manipulation to the newShape's paragraphs.
3) Deletes the orgShape

newShape is viewed to user on powerpoint window

4) Do the Undo through (ctrl+z) or undo button on ribbon, orgShape is
visible to user on window through undo stack

5) Now my problem arises here, when I again try to do this entire steps from
1-3 or mainly tries to read orgShape.TextFrame it gives me COM Exception
thus, not able to read the orgShape.TextFrame.TextRange (paragraphs) after
this undo event happened.

No idea why it behaves like this, kindly suggest. Any pointers will be
appreciated.

Thanks
doodle
From: Chirag on
I suspect you are not reinitializing the orgShape variable to the shape that
has been put back by the Undo operation. The orgShape variable stops holding
a valid reference as soon as you delete that shape. You need to set it
again.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"doodleM" <doodleM(a)discussions.microsoft.com> wrote in message
news:B2B24C1B-75A8-4577-9414-F741E17796A3(a)microsoft.com...
> Problem faced in Powerpoint 2007
>
> 1) I have a Shape in my current slide with some paragraphs
> 2) Creates a newShape as Duplicate of my Orginal Shape
> (newShape=orgShape.Duplicate) and Set the top, left of newShape as
> orgShape
> with some manipulation to the newShape's paragraphs.
> 3) Deletes the orgShape
>
> newShape is viewed to user on powerpoint window
>
> 4) Do the Undo through (ctrl+z) or undo button on ribbon, orgShape is
> visible to user on window through undo stack
>
> 5) Now my problem arises here, when I again try to do this entire steps
> from
> 1-3 or mainly tries to read orgShape.TextFrame it gives me COM Exception
> thus, not able to read the orgShape.TextFrame.TextRange (paragraphs) after
> this undo event happened.
>
> No idea why it behaves like this, kindly suggest. Any pointers will be
> appreciated.
>
> Thanks
> doodle

 | 
Pages: 1
Prev: Date calculations
Next: Live Charts in PPT 2007