Coding from Excel - Find Textboxes & Edit Text

  • Thread starter Thread starter Erin
  • Start date Start date
E

Erin

I am writing some VBA in Excel 2K and really don't know
what I'm doing.

I need to find text boxes on certain slides of a .ppt and
edit the text. I can open the presentation, select the
slides I want to look through and do a for each next loop
to look at them one at a time. I assume I need to do
something similar with .shapes, but I don't know the
syntax for identifying a text box (vs a chart for example)
and selecting/editing it.

Any and all help is appreciated.

Thank you

Erin
 
Thank you. Now I know the number, but I still can't
select it! I get the follwing error:
#429 - ActiveX component can't create object

I have 9 shapes on that slide, so I know it should find
the 3rd one! It won't even return the type.

Is there something else I'm missing? I know I am getting
into the ppt file (I'm just inserting this into code that
already works, changing values in MSGraph on the same
slides), but again, syntax for working in ppt, even the
object layer in Excel, is new to me.


Thank you again

Erin
-----Original Message-----
Erin,

What you need to find is the number of the shape and the
number of the slide. The number of the slide is relatively
easy. The number of the shape is determined from the order
in which the shapes were placed on the slide. For example,
if you are trying to get the fourth shape placed on the
third slide, the command is
ActivePresentation.Slides(3).Shapes(4)

To determine the number of the text box you are seeking,
open the powerpoint presentation in Slide view, display
the slide you want, and press (and count) the tab key
until the shape you want is highlighted. This will give
you the shape number.
 
I need to find text boxes on certain slides of a .ppt and
edit the text. I can open the presentation, select the
slides I want to look through and do a for each next loop
to look at them one at a time. I assume I need to do
something similar with .shapes, but I don't know the
syntax for identifying a text box (vs a chart for example)
and selecting/editing it.

Have a look at the routines here, Erin:

Export Text to a text file (Mac or PC)
http://www.rdpslides.com/pptfaq/FAQ00274.htm
 
Steve - you've been my lifesaver today! I have solved the
problem (I did realize I needed a little different
approach) but I never would have gotten there without your
suggestion below.

I've done my little hapy dance and I'll go back to work
now!

Thank you!

Erin
 
Back
Top