View Full Version : Move shapes according to date or alphabetical order and keep shape alignment and size
ruby1989
03-16-2016, 02:22 PM
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.
15684Ex:
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
John Wilson
03-19-2016, 03:46 AM
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!
ruby1989
03-22-2016, 07:15 AM
15730
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
John Wilson
03-22-2016, 10:26 AM
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?
ruby1989
03-22-2016, 04:10 PM
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!
John Wilson
03-23-2016, 04:15 AM
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.
ruby1989
03-23-2016, 08:26 AM
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
John Wilson
03-23-2016, 11:31 AM
15742The 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.
ruby1989
03-23-2016, 12:30 PM
15742The 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!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.