One question I’m often asked when conducting our PowerPoint training course is “Is there a way to add shapes to a grouped object within PowerPoint?”

Whilst for some, the answer is as simple as selecting an additional object and grouping it in with the other group, others realise that in doing this any existing animations that are placed on the original group will get removed.

What most people don’t know is that there’s a way of carrying out this process within standard PowerPoint. All that you need to do is use the control button (Ctrl) on your keyboard. When you hold down this key and click and drag an object in PowerPoint it creates a duplicate, and the duplicate is positioned wherever you let go of the mouse button.

Similarly you can use the shortcut Ctrl+D and you get a duplicate of your original object slightly offset on top of your original. (If you want to create a series of objects in line with each other, move your first duplicate to where you want it to be, you can now press Ctrl+D and your duplicates all appear at the same interval, perfectly in alignment with each other.)

But did you know that this same technique can be applied within a group?

I’ve created a quick video to show the process:

The steps are written out below:

  • Simply click on the group first, then select the object you’d like to duplicate.
  • Hold down the control key, then click and drag the object to the desired position.
  • You have now created an additional shape within the group.
  • If you need the shape to be different to the one you’ve duplicated, simply select the object, click on the format object tab in the ribbon, select ‘edit shape’ option, then change the shape to the PowerPoint default of your choice.

Though this method does work, it is pretty time consuming! That’s why, when our resident geniuses decided to develop a PowerPoint add-in, they included an Add to Group tool. With one click you can add an object (shape, line, text box, image – you name it!) to a group without losing the already existing layout or animation settings. Our add-in is called BrightSlide and you can download it for free here. The Add to Group tool can be found under the BrightSlide tab in Selection & Object.

Simple!

Have fun grouping and animating!

 

Leave a comment
Written by

Vincent Thompson

Principal design consultant

View Vincent Thompson's profile

Related articles

  1. Image of Arijanit Arijanit says:

    Thank you for this post. Really helpfull.
    But it didn’t solve my problem. Since all the objects I have in my group are text objects.
    Cant format a text into a shape.

  2. Image of Andy Engelkemier Andy Engelkemier says:

    This was SOOO helpful. I searched online, and found about 15 responses saying this couldn’t be done. They suggested duplicating the group, ungrouping one set, adding your object, then using animation painter. But that doesn’t work because animation painter doesn’t take into consideration multiple objects having a bunch of animations, in which order. I know that’s confusing, but lets say my circle group shrinks. Then a square moves over to the right, then the circle group Moves over it, then a triangle appears, then the circle group flies off the bottom. You can’t animation painter that because the order is only recorded as with, or after. all the animation will just be added to the end instead of remembering it’s in the middle. My animation is Way more complicated than that, but you saved me some time.

    I had to add an image to a group of images. As Arijanit points out though, if your group doesn’t contain the type of object you need, it still appears you may be SOL. Maybe if I’m going to do some complex animations I’ll just add a small blank PNG, a text box with nothing, a shape that’s transparent, and go from there. That way I could always duplicate the object and swap it with what I need.

  3. Image of BK BK says:

    I’m surprised to see that it needs an add-in for this… I have a presentation with animated 7 groups. Lets see if this helps.

  4. Image of Neman Syed Neman Syed says:

    For what it’s worth, Jamie Garroch has a VBA solution that’s worked very well for me so far. There are a few tweaks by me in the code below from his original, but it’s mostly his. (Link in code comments.) I recommend putting this into its own module only for legibility, as explained in the top comment. I’m using it on PPT 2016/Office 365 as-is.

    Important: Grouping animated objects loses the animations of the objects. Jamie’s code preserves the animation applied to the group, but still loses the animation applied to the object. There seems to be no way around that. (That’s actually what I was Googling for. There’s probably a really awkward code-based solution for the problem.)

    Note: If you don’t know how to add/run VBA into PPT, there are MANY tutorials you can find online. I suggest http://www.pptfaq.com/FAQ00033_How_do_I_use_VBA_code_in_PowerPoint.htm as a starting point.

    Hope it helps!
    ——————-

    Option Explicit

    ‘Because of the Private Enum that starts this off, I’m choosing to keep
    ‘this sub in its own module for legibility. Otherwise the enum would need
    ‘to be at the top of the module, which makes it harder to keep track of
    ‘in a generic Utils module.

    ‘**********************************************************************
    ‘ Macro : AddShapeToGroup()
    ‘ Author : Jamie Garroch
    ‘ Date : 13 May 2014
    ‘ Updated : 26 August 2015 (to support single animated shapes)
    ‘ Copyright (c) YOUpresent Ltd. 2014 http://youpresent.co.uk
    http://youpresent.co.uk/free-vba-add-shape-group/
    ‘**********************************************************************

    ‘ Purpose : Adds a shape to an existing multi-object group or animated
    ‘ single object while maintaining the source animation settings.

    ‘ Actions:
    ‘ 1. Looks for one group and one non-group in the user selection OR
    ‘ 2. Looks for one animated shape and one non-animated shape
    ‘ 3. Stores the animation settings and animation position of the group or shape
    ‘ 4. Stores the source group/shape name and layer position (z-order)
    ‘ 5. Ungroups the group, loosing the animation, its name and layer
    ‘ 5. Selects all the items from the original group/shape plus the new object
    ‘ 6. Creates a new group
    ‘ 7. Applies the original animation settings and animation position
    ‘ 8. Applies the original group’s name and layer position

    ‘ Limitations:
    ‘ 1. Only works if the user group or shape has a single animation

    ‘ Caveats:
    ‘ 1. Only tested in PowerPoint 2013 32 bit on Windows 7 64 bit
    ‘**********************************************************************

    Private Enum ypAddMode
    ypAddModeGroup
    ypAddModeShape
    End Enum

    Sub AddShapeToGroup()
    Dim AddMode As ypAddMode ‘ Adding to a group of shapes or a single shape
    Dim oGrp As Shape ‘ The user group
    Dim oAdd As Shape ‘ The user shape to add to the group
    Dim oShp As Shape ‘ Temporary object
    Dim oGrpItems As New Collection ‘ A collection of all shapes in the user group
    Dim userViewType As Variant ‘ The users selected view type
    Dim GrpName As String ‘ Name of the user group
    Dim CurSlide As Integer ‘ Index of the current slide
    Dim AnimPos As Integer ‘ Position of the group’s animation within the slide animation sequence
    Dim counter As Integer ‘ Loop counter
    Dim Layer As Integer ‘ The layer (z-order) of the user group
    Dim LayerFlag As Boolean ‘ Flag to determine if the group is above the shape to be added
    Dim LoopCounter As Integer

    ‘ Ignore errors, for example if an animation doesn’t exist for the group an error will be generated
    On Error Resume Next

    With ActiveWindow.Selection

    ‘ Check that shapes are selected
    If Not .Type = ppSelectionShapes Then GoTo IncorrectSelection
    ‘ Check that 2 shapes are selected
    If Not .ShapeRange.Count = 2 Then GoTo IncorrectSelection

    ‘ Try to set references to one group and one non-group shape
    If .ShapeRange(1).Type = msoGroup Then
    Set oGrp = .ShapeRange(1)
    If Not .ShapeRange(2).Type = msoGroup Then _
    Set oAdd = .ShapeRange(2)
    Else
    If .ShapeRange(2).Type = msoGroup Then Set oGrp = .ShapeRange(2)
    If Not .ShapeRange(1).Type = msoGroup Then Set oAdd = .ShapeRange(1)
    End If

    ‘ If we don’t have one group and one non-group, try to determine if we have one shape with and one shape without animation
    If oGrp Is Nothing Or oAdd Is Nothing Then
    If .ShapeRange(1).AnimationSettings.Animate And Not .ShapeRange(2).AnimationSettings.Animate Then _
    Set oAdd = .ShapeRange(2): Set oGrp = .ShapeRange(1): AddMode = ypAddModeShape
    If .ShapeRange(2).AnimationSettings.Animate And Not .ShapeRange(1).AnimationSettings.Animate Then _
    Set oAdd = .ShapeRange(1): Set oGrp = .ShapeRange(2): AddMode = ypAddModeShape
    Else
    AddMode = ypAddModeGroup
    End If

    End With

    ‘ If we haven’t found one animated shape and one non animated shape or a shape and a group, exit
    If oGrp Is Nothing Or oAdd Is Nothing Then GoTo IncorrectSelection

    ‘ Store the user’s view type
    userViewType = ActiveWindow.ViewType

    ‘ Get the current slide index
    CurSlide = ActiveWindow.View.Slide.SlideIndex

    ‘ Store the groups’s animation position
    With ActivePresentation.Slides(CurSlide).TimeLine
    For counter = 1 To .MainSequence.Count
    ‘If .MainSequence(counter).DisplayName = oGrp.Name Then AnimPos = counter
    If .MainSequence(counter).Shape.Name = oGrp.Name Then AnimPos = counter
    Next
    End With

    ‘ Store the group’s z-order
    Layer = oGrp.ZOrderPosition

    ‘ Set the layer flag to true if the user group is above the user shape to be added
    If oGrp.ZOrderPosition > oAdd.ZOrderPosition Then LayerFlag = True

    ‘ Get the animation properties of the group if they exist
    oGrp.PickupAnimation

    ‘ Create the collection of shapes in the group else just the single shape
    If AddMode = ypAddModeGroup Then
    For Each oShp In oGrp.GroupItems
    oGrpItems.Add oShp
    Next
    Else
    oGrpItems.Add oGrp
    End If

    ‘ Store the user group’s name
    GrpName = oGrp.Name

    ‘ Select the user group on its own
    oGrp.Select msoTrue

    ‘ Ungroup the user group, leaving all items selected
    If AddMode = ypAddModeGroup Then oGrp.Ungroup

    ‘ Make sure the shapes’ view is active by switching to a random view and then back to the user’s view
    ActiveWindow.ViewType = ppViewSlide
    ActiveWindow.ViewType = ppViewNormal
    ActiveWindow.ViewType = userViewType

    ‘ Select all of the shapes in the ungrouped collection
    For Each oShp In oGrpItems
    oShp.Select msoFalse
    Next

    ‘ Add the user object to be added to the group to the selection
    oAdd.Select msoFalse

    ‘ Group the original grouped items plus the new object
    Set oGrp = ActiveWindow.Selection.ShapeRange.Group

    ‘ Reapply the original animation
    oGrp.ApplyAnimation

    ‘ Move the recreated [last] animation to its original position
    With ActivePresentation.Slides(CurSlide).TimeLine
    .MainSequence(.MainSequence.Count).MoveTo AnimPos
    End With

    ‘ Move the group to the existing layer, taking into account where the group was in relation to the added shape
    LoopCounter = 0
    Do While Not oGrp.ZOrderPosition = IIf(LayerFlag, Layer – 1, Layer)
    LoopCounter = LoopCounter + 1
    oGrp.ZOrder msoBringForward
    If LoopCounter > 100 Then
    MsgBox “Something’s wrong with the oGrp, but this probably worked anyway.” & vbCrLf & oGrp.Name
    Exit Do
    End If
    Loop

    ‘ Reset the group name
    oGrp.Name = GrpName

    ‘ Clean up
    Set oGrp = Nothing
    Set oAdd = Nothing
    Set oShp = Nothing
    Set oGrpItems = Nothing

    MsgBox “The shape was added to the group.”, vbInformation + vbOKOnly

    Exit Sub

    IncorrectSelection:
    MsgBox “Please select one group and one non-group.”, vbInformation + vbOKOnly
    Exit Sub

    End Sub

    • Image of Joby Blume Joby Blume says:

      Thanks for sharing that here Neman.

      We’re a big fan of Jamie’s work, and have collaborated with him on complex work for clients too!

Leave a Reply

Join the BrightCarbon mailing list for monthly invites and resources

Tell me more!

I did not think it was possible for an external team to get our message so quickly and accurately. You got our messages better than we did, and delivered presentations that were slick and really effective.

Guy Shepherd Bouygues