Reading textvalue from powerpoint slide..!

S

sashidhar

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
 
D

David Marcovitz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top