Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Autoshape vs Textbox

472 views
Skip to first unread message

Colleyville Alan

unread,
Jun 14, 2002, 1:02:25 PM6/14/02
to
I have been doing some VBA coding to extract the contents of slides from
PPT. I notice that some objects that contain text are referred to by PPT as
"Textboxes" while others that contain text are called "Autoshapes", yet
those autoshapes contain text. In fact, if I right click on the autoshape
and choose the "Format autoshape" selection, the tabbed dialog box has a tab
for the textbox characteristics of that autoshape.

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.


Sonia

unread,
Jun 14, 2002, 1:27:26 PM6/14/02
to
It's easier to offer an exercise rather than try to explain, though Steve
and others will jump in and give you the technical explanation that you
need. Draw a rectangle and release the mouse/pointing device. Immediately
type a word. Then select the rectangle and apply "no fill" and "no line".
Now it "looks" like a textbox, but when you click on it the bounding handles
indicate an invisible shape. Now click on the text tool and type the same
word. Click outside the text. You have two instances of the word that look
the same, but one is in an object and one is in a textbox.

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...

Colleyville Alan

unread,
Jun 14, 2002, 1:38:23 PM6/14/02
to
"Sonia" <sc...@nowhere.com> wrote in message
news:#MFmoi8ECHA.1260@tkmsftngp07...

> It's easier to offer an exercise rather than try to explain, though Steve
> and others will jump in and give you the technical explanation that you
> need. Draw a rectangle and release the mouse/pointing device.
Immediately
> type a word. Then select the rectangle and apply "no fill" and "no line".
> Now it "looks" like a textbox, but when you click on it the bounding
handles
> indicate an invisible shape. Now click on the text tool and type the same
> word. Click outside the text. You have two instances of the word that
look
> the same, but one is in an object and one is in a textbox.
>
> 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>
> --

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.

Steve Rindsberg

unread,
Jun 14, 2002, 3:42:36 PM6/14/02
to
> Basically, my question is what is the difference between a textbox and an
> autoshape that contains text?

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).


Steve Rindsberg

unread,
Jun 14, 2002, 3:47:21 PM6/14/02
to
> 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.

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.

Colleyville Alan

unread,
Jun 14, 2002, 3:57:17 PM6/14/02
to

"Steve Rindsberg" <ab...@localhost.com> wrote in message
news:#p$aRw9ECHA.2640@tkmsftngp04...

Excellent! Thanks for the info. I am making real progress on my project
and owe many thanks...

--

Brian Reilly, MS MVP

unread,
Jun 15, 2002, 7:08:43 AM6/15/02
to
I see Steve has given you the code to check for the hastextframe. It
is apparently confusing about the difference. You are correct there.
But internally to PPT an autoshape is a Type 1 and a textbox (not a
placeholder text box) is a Type 17.

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

0 new messages