Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / March 2008

Tip: Looking for answers? Try searching our database.

list properties that belong to a shape

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dale Fye - 21 Mar 2008 22:42 GMT
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
Steve Rindsberg - 22 Mar 2008 05:17 GMT
I'm not clear on what you're after.

If you want to list the properties of a selected shape you can:

With ActiveWindow.Selection.ShapeRange(1)
  ' List the properties you want:
  Debug.Print .Left
  Debug.Print .Top
  ' etc
End With

But you have to know what properties you want in advance.  There's no
collection of properties you can iterate through.

> 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.
[quoted text clipped - 19 lines]
>     debug.print prop.name, prop.value
> next

Signature

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

================================================
Dale Fye - 22 Mar 2008 12:45 GMT
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

> I'm not clear on what you're after.
>
[quoted text clipped - 41 lines]
> PPTools:  www.pptools.com
> ================================================
Steve Rindsberg - 25 Mar 2008 03:46 GMT
> Thanks for your responses, to this and my other questions.  They have been
> very helpful.
[quoted text clipped - 7 lines]
> In Access, my Office application of choice, each object has a properties
> collection, I just assumed that PPT objects would have the same collection .

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.

> If I write:
>
[quoted text clipped - 99 lines]
> > PPTools:  www.pptools.com
> > ================================================

Signature

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

================================================
Dale Fye - 25 Mar 2008 06:11 GMT
thanks, Steve.

>> Thanks for your responses, to this and my other questions.  They have
>> been
[quoted text clipped - 136 lines]
> PPTools:  www.pptools.com
> ================================================

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.