From: Steve Rindsberg on
I see. So let us know the steps to create one of the problem smart art types so we
can try it here.

In article <AE337FAA-B39A-4D76-8ED4-D7B262294332(a)microsoft.com>, Caio Milani wrote:
> Yes, it has to do with the type of smart art. Some types of smart art have a
> collection inside the .TextFrame.TextRange, hence it's not possible to
> access the .TextFrame.TextRange.text property. Error "member can only be
> accessed for a single shape"
>
> Therefore I'm trying to find a way to access each member of the
> ..TextFrame.TextRange collection and then the text property
>
> "Steve Rindsberg" wrote:
>
> > This slightly modified version works here. All I've really done is change the
> > variable names and added the missing End With, etc.
> >
> > It may have to do with the type of smartart, but also, have you applied any
> > Service Packs? As it happens, I did this in a computer with SP1 installed.
> >
> > Dim oSh As Shape
> > Dim oSl As Slide
> > Dim x As Long
> >
> > Set oSl = ActivePresentation.Slides(1)
> >
> > For Each oSh In oSl.Shapes
> > With oSh
> > If .Type = msoSmartArt Then
> > For x = 1 To .GroupItems.Count
> > With .GroupItems(x)
> > If .HasTextFrame Then
> > If .TextFrame.HasText Then
> > Debug.Print .TextFrame.TextRange.Text
> > End If
> > End If
> > End With
> > Next 'x
> > End If
> > End With
> > Next
> >
> > End Sub
> >
> > In article <04CE56A9-4AAA-4CB2-B5A0-C09BA8A7DFD5(a)microsoft.com>, Caio Milani
> > wrote:
> > > Hi,
> > >
> > > I am trying to access textrange.text property inside a msoSmartArt
> > >
> > > if I use the code below I get
> > >
> > > "member can only be accessed for a single shape" at Debug.print line
> > >
> > > For Each oShp In oSld.Shapes
> > > With oShp
> > > If .Type = msoSmartArt Then
> > > For x = 1 To .GroupItems.Count
> > > With .GroupItems(x)
> > > If .HasTextFrame Then
> > > If .TextFrame.HasText Then
> > > Debug.Print .TextFrame.TextRange.text
> > > End If
> > > End If
> > > End With
> > > Next x
> > > End If
> > >
> > > The .GroupItems(x).TextFrame.TextRange.Count returns 3. At the locals window
> > > a can see that each of these 3 object refers to each line of text inside the
> > > shape.
> > >
> > > How do I access the collection members?
> > > I tried
> > >
> > > ..GroupItems(x).TextFrame.TextRange(1).TextRange.text and it fails.
> >
> >
> > ==============================
> > PPT Frequently Asked Questions
> > http://www.pptfaq.com/
> >
> > PPTools add-ins for PowerPoint
> > http://www.pptools.com/
> >
> > Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14
> >
> >


==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/

Don't Miss the PPTLive User Conference! Atlanta | Oct 11-14