From: sashidhar on
Hi friends..!

I created some powerpoint slides using c#.net.
Is there any way to access the values of the text from powerpoint..!
Example:-

I added
activeSlide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, mileDescLeft, mileDescTop, mileDescWidth, mileDescHeight); in Powerpoint .
i Have Read the Value after Drawing.. after it is saved and closed i have to
read the value from powerpoint slide..!

If I Change the Text in powerpoint active slide is there way to get
text of the changed one..!


ThankYou

From: David Marcovitz on
On 12/19/09 4:35 AM, in article
A6E3A2A0-3391-42D6-8AE2-2248F5DE1D12(a)microsoft.com, "sashidhar"
<sashidhar(a)discussions.microsoft.com> wrote:

> Hi friends..!
>
> I created some powerpoint slides using c#.net.
> Is there any way to access the values of the text from powerpoint..!
> Example:-
>
> I added
> activeSlide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal,
> mileDescLeft, mileDescTop, mileDescWidth, mileDescHeight); in Powerpoint .
> i Have Read the Value after Drawing.. after it is saved and closed i have to
> read the value from powerpoint slide..!
>
> If I Change the Text in powerpoint active slide is there way to get
> text of the changed one..!
>
>
> ThankYou
>

If I understand your question correctly, the key here is to find a way to
get a pointer to text box. When you first add it, you can assign the textbox
to a variable. After you close it, you have to generate that pointer
somehow. This can be done in a number of ways. If you know you are getting
the last shape added to the slide, then it is something like (in VBA):
With ActivePresentation.Slides(SLIDENUM)
.Shapes(.Shapes.Count).TextFrame.TextRange.Text
End With

If you don't know that it will be the last shape added, you will need some
other way of identifying the shape. This could be based on the location and
size (that you just specified), or you could add a tag to the shape when you
add it and identify it based on the tag.

--David
--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland