Consulting

Results 1 to 2 of 2

Thread: Add shape/textbox in a group dynamically using vba in powerpoint

  1. #1
    VBAX Regular
    Joined
    Sep 2020
    Posts
    10
    Location

    Add shape/textbox in a group dynamically using vba in powerpoint

    Sir, need some help from this forum.


    I have a group(say groupLast1) which consist of some textboxes(say textBox1,textBox2,textBox3) & some shapes(say rectangleTop1, rectangleBottom1).
    Now I want to add textbox(say textBoxNew1 )in this group ie in groupLast1 dynamically.
    But I cannot configure the grouping part using array.


    What I did:


    groupLast1.Ungroup
    ------- fetching shape name from group -------


    ActivePresentation.Slides(1).Shapes.(groupLast1)
    For x = 1 To GroupItemes.Count


    "shapeName" & x = GroupItemes(x).Name


    Next x
    -------- grouping part------------------


    newGshp = ActivePresentation.Slides(1).Shapes.Range(Array("textBoxNew1", ....................)).Group


    newGshp.Name = groupLast1


    So how to configure the array part(adding fetch name automatically ie "shapeName" & x) so that every time I add some shape/textbox it will automatically configure in group

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,017
    Location
    The code to do this is not simple but fortunately Jamie Garroch has done it for you.

    Free PowerPoint VBA to add shape to animated group or object | YOUpresent
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

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
  •