ungroup all?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Just wondering if there's a way to do some sort of global Ungroup, where I
can ungroup all objects within a PowerPoint file with one command or chunk of
VBA code.

My goal is to be able to extract the data in the PowerPoint file. I can get
the text stuff no problem, but I need to ungroup my table shapes before I can
get at the data within them...I think.

Thanks.
 
Tony Logan said:
Just wondering if there's a way to do some sort of global Ungroup, where I
can ungroup all objects within a PowerPoint file with one command or chunk of
VBA code.

My goal is to be able to extract the data in the PowerPoint file. I can get
the text stuff no problem, but I need to ungroup my table shapes before I can
get at the data within them...I think.

It depends on where the tables come from; you can get at the text in PPT tables,
I'm pretty sure (but don't have the code handy).

But ...

Sub BustEmUp()
Dim oSh as Shape
Dim oSl as Slide

For Each oSl in ActivePresentation.Slides
For Each oSh in oSl.Shapes
Select Case oSh.Type
Case Is = msoGroup, msoTable
' msoEmbeddedOLEObect etc?
oSh.Ungroup
End Select
Next
Next
End Sub

Gets a bit trickier if you want to tackle groups within groups (within groups
withi ...)))
 
Gets a bit trickier if you want to tackle groups within groups (within
groups
withi ...)))


Not really that tricky, Steve. Just add a Boolean flag and repeat the
presentation check loop until the flag stays clear. Or were you insisting
it all be done in a single pass :)

Bill
 
Not really that tricky, Steve. Just add a Boolean flag and repeat the
presentation check loop until the flag stays clear. Or were you insisting
it all be done in a single pass :)

True, true. Thanks.

For a single pass you need the snake to eat its tail. Recurses ... embroiled
again!
 

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

Back
Top