Consulting

Results 1 to 9 of 9

Thread: Move shapes according to date or alphabetical order and keep shape alignment and size

  1. #1
    VBAX Newbie
    Joined
    Mar 2016
    Posts
    5
    Location

    Move shapes according to date or alphabetical order and keep shape alignment and size

    Hello,

    I'm new here. So here is the dilemma. I have to maintain a book that has a large list of names with:

    • Name
    • location
    • picture
    • border made out of a shape


    I have 200 of these. Now, if by chance a new arrival comes through and he needs to go alphabetically between the last name alberts and barts. I have to manually move 199 spaces in PowerPoint, to create that one space up on top between those two names.

    I align center and group each person with their outside border, picture, name and location.

    So when, I do this manually, when we do this what happens is the alignment of the items is usually different from page to page.

    Ex:
    • The boxes don't line up and you see them jump from page to page
    • The text is not aligned throughout all the boxes vertically and horizontally
    • the pictures are not aligned to the box
    • the pictures are not aligned horizontally across and vertically down in their rows and columns



    The other problem:

    We have 300 of these. Each contains the following:

    • A outline box
    • four text boxes


    Again, when we have to move these we have to keep grouping and aligning to get the first spot empty in order to put in the latest achievement.

    When we do this what happens is the alignment of the items is usually different from page to page.

    PPT Trial.pptxEx:
    • The outline boxes don't line up and you see them jump
    • The text is not aligned throughout all the boxes



    As this takes us very long and sometimes hours at a time, if someone could be a wizard and help that would be very much appreciated!

    Thanks in advance,
    Ruby

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    It can certainly be done with code BUT you would need to group each set of shapes. If you can send me just one slide showing sample text and pictures with each shape a group I may be able to give you suitable code as we have done this for other companies. No guarantees!
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Newbie
    Joined
    Mar 2016
    Posts
    5
    Location
    PPT Trial_322.pptx
    Quote Originally Posted by John Wilson View Post
    It can certainly be done with code BUT you would need to group each set of shapes. If you can send me just one slide showing sample text and pictures with each shape a group I may be able to give you suitable code as we have done this for other companies. No guarantees!

    Hi John,

    Thank you for the reply! Sorry about the delay. I had some issues posting a response here which caused the delay.

    Please find the requested file attached. I really hope there is an automated way to do this. At the moment, it is very tedious and time consuming. I have given you pretty much exactly what we use.

    Hope to hear from you soon. Thanks again for this! Much appreciated!

    Ruby

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Except they are all the same on the second slide so how would they be sorted?

    In the second slide which text would be used to order the shapes?
    Last edited by John Wilson; 03-22-2016 at 10:41 AM.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Newbie
    Joined
    Mar 2016
    Posts
    5
    Location
    Quote Originally Posted by John Wilson View Post
    Except they are all the same on the second slide so how would they be sorted?

    In the second slide which text would be used to order the shapes?

    Oh got it.

    So the slide with the pics gets sorted by the first letter of the first name which is located above the picture. Sorry for the confusion.

    When we have to add a new member or a new grouping like in the first slide we literally have to move each group of shapes/images/text boxes to get it in the right spot.

    Thank you!

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    OK I have added some code to do what I think you need. It is not as robust as we would like if this was one of our usual commercial solutions but it is free!

    There are things you need to do to make this work reasonably

    In each group the Name or date need to be the front item (in the selection pane they need to be at the top of the list in each group) This is vital. I have done this in the sample and named the shapes Name and Date so you can see.

    To test the sample make sure Macros are enabled Select the correct slide and in View Tab> Macros Run the correct macro>

    If you run the wrong one it will error at the moment as I said it is not a robust solution more a proof of concept. Hopefully it should get the job done though. Ideally you would need a permanent ribbon menu to run these with proper error checks. Obviously we could do this but you would need to approach us outside the forum for a quote.
    Attached Files Attached Files
    Last edited by John Wilson; 03-23-2016 at 06:59 AM.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Newbie
    Joined
    Mar 2016
    Posts
    5
    Location
    Quote Originally Posted by John Wilson View Post
    OK I have added some code to do what I think you need. It is not as robust as we would like if this was one of our usual commercial solutions but it is free!

    There are things you need to do to make this work reasonably

    In each group the Name or date need to be the front item (in the selection pane they need to be at the top of the list in each group) This is vital. I have done this in the sample and named the shapes Name and Date so you can see.

    To test the sample make sure Macros are enabled Select the correct slide and in View Tab> Macros Run the correct macro>

    If you run the wrong one it will error at the moment as I said it is not a robust solution more a proof of concept. Hopefully it should get the job done though. Ideally you would need a permanent ribbon menu to run these with proper error checks. Obviously we could do this but you would need to approach us outside the forum for a quote.


    Hi John,

    This is amazing! It works great! You're a wizard!
    The only thing is, right now it sorts by earliest to newest date. I need it to be newest to oldest. So the most recent one on top.
    When I ran the macro on the date page, it worked but the sort is the opposite.
    The other one was flawless! I'm so impressed.

    Thanks again, I hope that this is an easy fix and you may be able to help!

    Also, a quick question and if it's easy... If in the name file they have for ex:

    Ruby Z
    Ruby X
    Ruby Brooks
    Ruby Bass

    These text items are the first thing in each group with a pic and location in the selection pane, but we want to sort them by last name instead. Is that doable?


    Best,
    Ruby
    Last edited by ruby1989; 03-23-2016 at 08:50 AM.

  8. #8
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    PPT Trial_Sorter (2).pptmThe first is easy

    The second might be depending on what you mean. If the order in ONLY the last name that's OK otherwise the best way would be to reverse the name e.g. Brooks,Ruby

    Bear in mind what I said about it not being very robust but it should be good enough to save a few hours! I think the first slide is already sorted but just mix them up any way you want. The code will sort it out.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  9. #9
    VBAX Newbie
    Joined
    Mar 2016
    Posts
    5
    Location
    Quote Originally Posted by John Wilson View Post
    PPT Trial_Sorter (2).pptmThe first is easy

    The second might be depending on what you mean. If the order in ONLY the last name that's OK otherwise the best way would be to reverse the name e.g. Brooks,Ruby

    Bear in mind what I said about it not being very robust but it should be good enough to save a few hours! I think the first slide is already sorted but just mix them up any way you want. The code will sort it out.

    This is great!

    So for the second, I mean that usually one text box the one with the name and the one that is sorting the boxes out usually has a name for ex:

    Ruby spain
    ruby books
    ruby jewels

    Instead of the code sorting by the first letter of the first name it needs to sort by first letter of the last name in the text box.

    the order would be after the macro is run:

    ruby books
    Ruby jewels
    ruby Spain


    Yes it really does! Thank u so much!

    Please let me know if this is doable if not totally fine. Your help was very very much appreciated! Thanks again for everything!

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
  •