Supercharge your PowerPoint productivity with
|
PPTools |
ProblemA user on the PowerPoint newsgroup needed a way of making sure that certain shapes in his presentation were always on top of the other shapes on each slide, and that they were always "stacked" in a certain order. In this case, all arrows were to be on top, all text boxes below the arrows, all pictures below the text boxes and everything else on the slide below that. At first glance this seems easy: step through all of the shapes on each slide once for each type of shape, and if the shape is the type we're searching for, bring it to the top. Unfortunately, this doesn't work, because the order of the shape collection gets changed each time you change the "stacking order". Instead, we get a reference to each shape that meets our criteria, put it in an array, then once we've checked all the shapes, process the array, moving each shape to the top in order. SolutionSub StackEmDanO() Dim oShapes As Shapes For Each oSl In ActivePresentation.Slides ' Add the shapes we want to affect to the array of shapes ' Pictures Set aShapes(x) = oSh ' Now bring each shape in the array to the top End Sub See How do I use VBA code in PowerPoint? to learn how to use this example code. Search terms:order,shape,stack,z Español Deutsch Français Português Italiano Nederlands Greek Japanese Korean Chinese |
Supercharge your PPT Productivity with PPTools
|
content authoring & site maintenance by |
Bringing certain shapes on top of others in your slides
http://www.pptfaq.com/FAQ00695.htm
Last update 09 September, 2006