Share via

How can I overlay photos automatically that got imported with the photo album function?

Anonymous
2022-04-09T17:07:13+00:00

Dear Microsoft Community,

For my research I have to analyze photos manually. For that I separate photos optically in fields of equal size by adding a grid above each photo.

I import all the photos with the photo album function at once and that works quite well.

I struggle with adding the grid. The grid I add is a transparent .png file. The grid has the size of the slide. When I add it by pasting it onto the slide its position is always off. It doesn't appear in the left upper corner, but is off by always the same distance. So I a am forced to pull it each single time to the corner, so that it covers the whole slide. This is a lot of work because I have thousands of photos.

I tried to use the design function, putting the grid in the foreground, while putting the placeholder for my photos in the background. But when I used this design the imported picture was in the foreground and covered the grid. The grid was behind the photo and was neither movable nor was it possible to put it in the foreground.

How can I import my photos and have the grid added above in the right position, without doing it by hand for thousands of photos?

With best regards Nick

Microsoft 365 and Office | PowerPoint | For education | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2022-04-11T09:48:43+00:00

    You probably don't need Environ if you know the path so "C:\Users\Username\Desktop\Grid.png" should do it. Environ("USERPROFILE") just calculates the path for the current user on most PCs

    Glad it helped!

    1 person found this answer helpful.
    0 comments No comments

Answer accepted by question author

  1. Anonymous
    2022-04-10T11:59:54+00:00

    It sounds like something you could do with vba but you will have to give more precise instructions really

    If the grid file is a png on your desktop called grid.png and it is the correct size

    TRY (on a copy!!)

    Sub AddGrid()

    Dim gridaddress As String

    Dim osld As Slide

    ' assumes the grid pic is on the desktop and named grid.png

    gridaddress = Environ("USERPROFILE") & "\Desktop\grid.png"

    For Each osld In ActivePresentation.Slides

    With osld.Shapes.AddPicture(gridaddress, msoFalse, msoTrue, 0, 0)

    .Name = "OverGrid"

    End With

    Next

    End Sub

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-04-11T09:34:07+00:00

    Thank you John,

    Your VBA Code worked perfectly and saved me a lot of work.

    But for it to work I had to change one line to:

    gridaddress = Environ("C:\Users\Username\Desktop") & "Grid.png"

    I guess the full address minus the filename has to be in the Environ bracket and just the filename after the &.

    This solved my problem.

    With best regards,

    Nick

    0 comments No comments
  2. Anonymous
    2022-04-09T18:02:57+00:00

    Muhammad,

    thank you for your fast and kind reply.

    But this doesn't solve my problem, since I had this knowledge already before.

    I have over 1000 Pictures to process and this would be too inefficient and time consuming.

    I want to do this in an automated fashion and I think that it is possible to reach, because this is a very repetitive task that should be easily doable for a computer if provided the right instructions.

    I am looking for the instructions to provide to the computer so he does this task be himself.

    Maybe with VBA?

    With best regard

    Nick

    0 comments No comments
  3. Anonymous
    2022-04-09T17:32:33+00:00

    Hi Nick,

    First, my pleasure to assist you.

    As per your description, please don’t worry, we can work together to narrow down and resolve the situation.

    As a simple workaround I think you may do manually, (you can overlay multiple images using the same below process in PowerPoint. Just make sure each image outside of the base has a transparent background.

    To overlay images in PowerPoint, e.g., open your presentation or start a new presentation. Select the slide you wish to edit and click on the area where you want the picture to sit. Click Insert then Pictures and select the primary picture.

    The picture will insert to the slide, and you can resize by dragging the corners. You can also click and hold the cursor on the photo to drag around the slide until the location is perfect. Then click on the picture and repeat the photo insert process for the second overlay image**.** Now drag the corners to reach the desired size and drag the photo around the slide until the desired position is achieved.

    I appreciate your understanding and stay safe!!

    Best regards

    Waqas Muhammad

    0 comments No comments