list properties that belong to a shape

D

Dale Fye

I would like to list the properties that apply to shapes of various types.
Specifically, I'm looking for those properties that might contain text.

As an example, the other day, I found out that I could create screen tips
that show up when I mouse over a shape.

Is there a way to do something like

Dim prop as property

'What I would like to do here is be able to select a shape in the active
presentation, then run a macro that uses the selected shape
'I still have not figured out how to do that part, so I generally do
something like the following line and iterate through the shape numbers till
I get the one I'm looking for.

set oShp = activewindow.presentations.slides(x).shapes(y)
oShp.Select

debug.print oShp.Name, oShp.Type
For each prop in oshp.properties
debug.print prop.name, prop.value
next
 
D

Dale Fye

Steve,

Thanks for your responses, to this and my other questions. They have been
very helpful.

Basically, I'm looking for a way to loop through a PPT presentation, and
identify every text string that could be embedded in the presentation
(whether it is visible to the viewer or not). I'm looking for text that is
in textboxes, captions, lists, control tips, alternate text, default values,
....

In Access, my Office application of choice, each object has a properties
collection, I just assumed that PPT objects would have the same collection .
If I write:

Dim prop As Property
Set obj = Forms("frm_Splash").cbo_Slide
On Error Resume Next
For Each prop In obj.Properties
Debug.Print prop.Name, prop.Type, prop.Value
Next

Then I'll get a list of 50 or so properties (see a partial list below) that
belong to that combo box. By restricting my search to those properties with
Type=8 (text), I can quickly search through all of the properties, and
capture the control, the property, and the value associated with that text
property. Since PPT does not seem to have this functionality. I'm going to
have to identify all of the various object types, then search to see what
properties they have and check for those properties individually. This will
involve a huge amount of additional reseearch and coding.

EventProcPrefix 8 cbo_Slide
Name 8 cbo_Slide
ControlType 2 111
ControlSource 8
Format 8
ConditionalFormat 8209 Null
DecimalPlaces 2 255
InputMask 8
RowSourceType 8 Table/Query
RowSource 8 qry_frm_Splash_cbo_Slide_Num
ColumnCount 2 1
ColumnHeads 11 False
ColumnWidths 8
BoundColumn 3 1
ListRows 2 8
ListWidth 8 0
StatusBarText 8
LimitToList 11 False
AutoExpand 11 True
DefaultValue 8
IMEHold 11 False
IMEMode 2 0
IMESentenceMode 2 3
ValidationRule 8
ValidationText 8
Visible 11 True
DisplayWhen 2 0
Enabled 11 True
Locked 11 False
AllowAutoCorrect 11 True
TabStop 11 True
TabIndex 2 5
Left 2 8880
Top 2 1140
Width 2 1920
Height 2 259
BackStyle 2 1
BackColor 3 16777215
SpecialEffect 2 2
 
D

Dale Fye

thanks, Steve.

Steve Rindsberg said:
No, afraid not Dale. Gotta do it the hard way. Ways really ... OLE
Controls
on a slide are more like the form objects you're familiar with from
Access, but
the other shapes are quite different and there's no properties collection.





--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

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