Consulting

Results 1 to 6 of 6

Thread: Send Image to Back

  1. #1
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    3
    Location

    Send Image to Back

    Hey there. Admittedly, I know virtually nothing about VBA and I'm trying to piece together a macro to accomplish a seemingly simple combination of tasks on PowerPoint 2016.


    The PowerPoint presentation is in 16:9 widescreen format and the images (copy/pasted or dragged/dropped onto the side) need to fill the screen and then get sent to the back with a single click, if possible. The source images are also 16:9 but for some reason do not fill the screen; I do not have control over the source of these images, just what we do with them once they're in PowerPoint. This is a constant and very repetitive task and I'm trying to simplify it by using a macro. I've figured out how to have the image go to full screen using the macro but the send to back part of it is eluding me.


    Any help with this would be greatly appreciated. Thanks!
    Last edited by USAFS197; 01-30-2021 at 02:01 AM.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,095
    Location
    Try this (Picture should be selected)

    Sub pic()
    Dim opic As Shape
    Set opic = ActiveWindow.Selection.ShapeRange(1)
    With opic
    .LockAspectRatio = True
    .Height = ActivePresentation.PageSetup.SlideHeight
    .ZOrder (msoSendToBack)
    .Left = 0
    .Top = 0
    End With
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    3
    Location
    That did the trick, thanks! I tried all kinds of different combinations of ZOrder and msoSendToBack but, I couldn't find the right one that worked. Thanks again!

    I've got another one for you, if you're feeling generous. Is there a macro that can be made that can rotate a selected object on its center axis from 0-360 via input into a popup, per se? Like, lets say I want to rotate the selected object 33 degrees through input via a popup but another object 217 degrees or some other arbitrary number. 0 being straight up in this instance. Not sure if specificity in this regard is necessary. I think the popup might be necessary since this is a constant variable for the selected object.
    Last edited by USAFS197; 01-30-2021 at 11:41 PM.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,095
    Location
    Not sure why you need to do that as it is available in the standard GUI under More Rotation Options
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    3
    Location
    I ended up figuring out how to create the exact thing I was looking for. A quick popup that allows me to rotate the object exactly in the orientation needed. In my particular field, seconds add up and can be a detriment to our productivity. While we utilized the rotation option prior to this, it still wasn't very quick with respect to the new process using the macro I made. Thanks, John!

  6. #6
    Banned VBAX Newbie
    Joined
    Feb 2024
    Posts
    1
    Location
    This article provides a thorough analysis of a significant subject. After reading it, I believe my knowledge has increased.
    Last edited by georgiboy; 04-01-2024 at 04:18 AM. Reason: Removed spam

Posting Permissions

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