+ Reply to Thread
Results 1 to 1 of 1

Center-align picture objects with existing shape objects on all slides? Looking for help

  1. #1
    Registered User
    Join Date
    01-16-2009
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    56

    Center-align picture objects with existing shape objects on all slides? Looking for help

    See the attached deck. This is what the finished product should look like. Decks can be up to 350 slides.

    The chart/table combos are picture objects that are sometimes placed in random positions on the slide template. Those picture objects need to be aligned with the rectangle shape object on each slide.

    My goal is to automate the alignment of the picture objects with the shape objects. I have code that correctly gets the job done...for about 60% of the slides. Something is going awry for the other 40% and I don't know what it is.

    Any guidance would be hugely appreciated!!




    Need a macro that will:

    For every slide in presentation
    IF Rectangle 2 is on the RIGHT SIDE of slide, align Picture 2 with MIDDLE of Rectangle 2 WITHOUT REPOSITIONING RECTANGLE 2
    I already wrote the code for this piece, cleaned up and perfected by John Wilson. See code snippet below

    IF Rectangle 2 is at the BOTTOM of the slide, align VERTICAL CENTERS of Rectangle 2 and Picture 2 WITHOUT REPOSITIONING RECTANGLE 2
    In either scenario, need the macro to put a (somewhat) uniform amount of space between Picture 2 and Rectangle 2

    Alignment example PPT.JPG


    Existing code that takes care of the 1st scenario (where Rectangle 2 is on the right side of the slide):

    Please Login or Register  to view this content.
    ETA: This is a cross-post from VBA Express
    Attached Files Attached Files
    Last edited by ajava; 10-18-2019 at 12:21 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MS Excel Objects Lock Row based on Value working with Other Objects
    By Neuner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2019, 02:26 PM
  2. Replies: 9
    Last Post: 10-18-2018, 05:02 PM
  3. Align Objects Priority
    By Bobbbo in forum Excel General
    Replies: 1
    Last Post: 12-22-2016, 05:59 PM
  4. How to add different shape objects with name and colour using code
    By victor222 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-27-2016, 10:46 AM
  5. [SOLVED] Help request to align the picture center in web layout
    By mso3 in forum Word Formatting & General
    Replies: 4
    Last Post: 10-15-2015, 09:59 AM
  6. Replies: 0
    Last Post: 10-15-2015, 08:23 AM
  7. How to hide a selection of objects but show objects automatically when opening wkbk
    By slowjo1414 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2013, 05:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1