If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
list properties that belong to a shape
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 |
#2
|
|||
|
|||
list properties that belong to a shape
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. In article , Dale Fye wrote: 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, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#3
|
|||
|
|||
list properties that belong to a shape
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 "Steve Rindsberg" wrote in message ... 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. In article , Dale Fye wrote: 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, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#4
|
|||
|
|||
list properties that belong to a shape
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 . 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: 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 "Steve Rindsberg" wrote in message ... 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. In article , Dale Fye wrote: 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, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ -- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#5
|
|||
|
|||
list properties that belong to a shape
thanks, Steve. "Steve Rindsberg" wrote in message ... 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 . 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: 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 "Steve Rindsberg" wrote in message ... 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. In article , Dale Fye wrote: 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, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ -- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
Thread Tools | |
Display Modes | |
|
|