Basically, my question is what is the difference between a textbox and an
autoshape that contains text? The objects I am looking at look the same to
me - the person who built the slides has what I thought were textboxes since
they only contain formatted text, but PPT says they are autoshapes.
CA
Remove NoSpam to email me directly.
Now you've *seen* the difference and someone will jump in and tell you how
to deal with it in VBA because I'm a hopeless case in that department. <G>
--
Sonia, Microsoft PowerPoint MVP Team
http://www.soniacoleman.com
(Autorun CD Project Creator & Free Templates)
http://www.soniacoleman.com/Tutorials/Tutorials.htm
**************
"Colleyville Alan" <aechar...@NoSpam.attbi.com> wrote in message
news:BkpO8.33498$nZ3.6393@rwcrnsc53...
Thanks. I ask the question because I am trying to extract information from
the slides and thought that all of the text was in textboxes and so my code
would only have to trap for that type. Then I noticed that lots of
information was in autoshapes and not textboxes and I wondered what the
differences were between them.
It may still turn out to still be a simple problem, because the two things I
really need seem to be contained in textboxes, but since there are 300
slides across three files, I am going to have to do some verification of
that.
A text box is one type of autoshape.
Some autoshapes can contain text (obviously text boxes are one o' them) and
some can't (lines/arrows, for exampe).
with a reference to the shape
if sh.hastextframe then
if sh.textframe.hastext then
msgbox sh.textframe.textrange.text
end if
end if
(I think that's got it right ... close enough to get yer motor revved up
anyhow. <g>)
Toss in some error handling there, too. It's possible to have shapes that
PPT answers YES to on each of those tests then goes kaboom when you actually
touch the text.
For example, create a new blank title & bullets slide.
Insert a picture on the slide then drag it into the bullets placeholder.
Picture assumes the size and shape of the placeholder. A TEXT placeholder,
mind you.
It has a text frame and all that, and can have text according to ppt but
.... BOOM.
Excellent! Thanks for the info. I am making real progress on my project
and owe many thanks...
--
So you could just check for those two types with a Select Case
statement, assuming you didn't want the Placeholder text as well.
Brian Reilly, PowerPoint MVP