+ Reply to Thread
Results 1 to 5 of 5

VBA not sizing Pictures

  1. #1
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    VBA not sizing Pictures

    Hello,

    I'm attempting to use this Macro to center and size all pictures on all slides in a powerpoint presentation. The pictures center just fine but do not resize to the designated height and width values.
    If anyone could help me with this it would be greatly appreciated, thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,114

    Re: VBA not sizing Pictures

    I would have thought the shapes only centered correctly if you run the code twice or the shapes where already the size specified because you position based on width and height and then change those values.

    The shapes should at least have the correct width set. The height will only be correct is the shapes AspectRatio is unchecked.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: VBA not sizing Pictures

    Thanks Andy, that makes good sense. I applied the changes and it works perfectly now.

    Marking this as solved, much appreciated!

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,124

    Re: VBA not sizing Pictures

    but do not resize to the designated height and width values.
    Visually or technically? Since pictures are inserted with aspect ratio locked, the shape will only be the correct size on the last dimension given. So, if width is the last given, the height may be slightly more/less than height value given to satisfy aspect ratio.

    I had to move the height/width above the left/top to make it position the pictures correctly.
    David
    (*) Reputation points appreciated.

  5. #5
    Forum Contributor Pierce Quality's Avatar
    Join Date
    07-29-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: VBA not sizing Pictures

    Visually and technically, I had the aspect ratio locked which was the root of the problem.

    Thanks!

+ 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. Replies: 1
    Last Post: 05-02-2014, 06:18 AM
  2. Project management and pictures, basically make a day planner with pictures
    By Axe Doctor in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-10-2012, 12:58 PM
  3. [SOLVED] help sizing pictures inside a cell
    By rosboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 07:46 PM
  4. [SOLVED] Pictures.Visible question (after adding many pictures, they stop disappearing)
    By Abe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2006, 01:35 PM
  5. Replies: 1
    Last Post: 01-29-2006, 02:50 AM

Tags for this Thread

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