Consulting

Results 1 to 3 of 3

Thread: VBA ungroup Shape (SmartArt)

  1. #1

    Question VBA ungroup Shape (SmartArt)

    Does anyone know how to ungroup SmartArt element via VBA?
     Sub UngroupSmartArt()
    
    Dim shapeWithSmartArt As Shape
    Set shapeWithSmartArt = ActivePresentation.Slides(2).Shapes(2)
    
    shapeWithSmartArt.Ungroup
    
    End Sub
    I get an error for this code: "This member can only be accessed for a group."

    It doesn't make any sense to me, because it's easily possible to do it in powerpoint itself (Right click on SmartArt -> Group -> Ungroup). It's driving me nuts


    Can anyone help me with ungrouping SmartArt element/shape?

    I also took a look on similar question on stackoverflow (stackoverflow.com/questions/26977130/cannot-ungroup-a-powerpoint-smartart-shape), but it doesn't work properly, because ungrouped result is different in comparison to the one made via powerpoint itself.


    Please help me out. I would really appreciate any help!
    Last edited by Paul_Hossler; 03-02-2017 at 06:28 PM.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Before you spend time on this it looks like a cross post and the other post has an answer (or two)

    Cross Post
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    @michael24B

    @michael24B - welcome to the forums

    Please read the FAQ, esp the one about multi-posting

    http://www.vbaexpress.com/forum/faq...._new_faq_item3, and the link http://www.excelguru.ca/node/7


    I added the [CODE] tags around your macro, so next time if your click the [#] icon, you can get the [ CODE ] ... [ \CODE ] tags to paste your macro between
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •