Solved

PowerPoint: Arrange many images on a slide easily?

Posted on 2016-07-20
4
85 Views
Last Modified: 2016-07-24
Hi,

I have a PowerPoint slide with many (30) small images. Is there an easy way to arrange these in a grid format, without having to individually move them or move them in sub-groups? Ideally I could just select them all and click - arrange to a grid formation.

Thanks.
0
Comment
Question by:dabug80
  • 2
4 Comments
 
LVL 33

Accepted Solution

by:
Rob Henson earned 500 total points
ID: 41722861
Closest I can think of is using the Distribute function.

On the Home tab under the Arrange button there is a sub menu of Align. There are two options within this with Distribute Horizontally and Distribute vertically.

When distributing horizontally, set the position of the leftmost and rightmost item and then shift and select those two and those that are needed between them. This will then evenly space them between the outermost items.

Also if you have the "Snap to Grid" setting enabled you can drag the items to roughly the right place and they will align to the grid.

Thanks
Rob H
0
 
LVL 2

Expert Comment

by:Simulog
ID: 41722901
Another option is some VBA...
As noted in the macro, it will place the selected shapes in a grid based on the size of the biggest shape  and the space defined in "dSpc". It places the first column half way what's left of the slide depending on the number of columns and the max size of the shapes

It assumes you don't have too many shapes, since the way it is set up it will create as many rows as needed, possibly extending beyond the bottom of the slide.

Paste the code into a module of the presentation, select the shapes to move and run the macro.

Option Explicit
Sub ArrangeShapes()
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'The macro places the selected shapes in a grid based on the size of the biggest shape
'  and the space defined in "dSpc". It places the first column half way what's left of the slide
'  depending on the number of columns and the max size of the shapes
'  NOTE: It will create as many rows as needed, possibly extending beyond the bottom of the slide
'Author: Jörgen Möller, 21Jul2016
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dim dWdt As Double, dHgt As Double, dSpc As Double, dStart As Double
Dim dMaxW As Double, dMaxH As Double, dLft As Double, dTop As Double, iCols As Integer
Dim sShps As Variant, shp As Variant, r As Integer, c As Integer
    dSpc = 10
    dWdt = ActiveWindow.Selection.SlideRange.Master.Width   'The width of the slide
    dHgt = ActiveWindow.Selection.SlideRange.Master.Height  'The height of the slide
    Set sShps = ActiveWindow.Selection.ShapeRange           'The selected shapes
    
    For Each shp In sShps   'Loop through all selected shapes to find max width and height
        If dMaxW < shp.Width Then dMaxW = shp.Width
        If dMaxH < shp.Height Then dMaxH = shp.Height
    Next shp
    
    iCols = Int(dWdt / (dMaxW + dSpc))              'Calculate # of columns
    dStart = (dWdt - iCols * (dMaxW + dSpc)) / 2    'Calculate the remainder of the width to decide where to start
    
    r = 1
    For Each shp In sShps
        If c < iCols Then c = c + 1 Else c = 1: r = r + 1   'Define column# and row#
        shp.Left = dStart + (c - 1) * (dMaxW + dSpc)        'Place the shape in the right column
        shp.Top = (r - 1) * (dMaxH + dSpc)                  'Place the shape in the right row
    Next shp
End Sub

Open in new window

0
 
LVL 1

Assisted Solution

by:dabug80
dabug80 earned 0 total points
ID: 41726899
Thanks for the suggestions. I ended up using a variation of Rob's method. The important part being - Position at least one image at the furthest top and bottom points - then click distribute - then align left.

A bit tedious, but it did the job. I didn't test the macro as I completed the task prior.
0
 
LVL 1

Author Closing Comment

by:dabug80
ID: 41726901
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
My experience with Windows 10 over a one year period and suggestions for smooth operation
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question