web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to merge small ima...
Power Automate
Answered

How to merge small images (png) into a combine images (png)

(0) ShareShare
ReportReport
Posted on by 28

As topic, I extract images (png) from a PDF file.

then i need to merge some of them in 2 different images,

and i did not found any related action in PAD.

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Try automating this process:9B0C9F61-70DA-4154-B178-5EE5656EE5A6.jpeg

     

    https://products.aspose.app/words/merger/png

     

  • jlkuiu7 Profile Picture
    28 on at

    Can merge PNGs action done by script/code? this is a good way and it works.

    However, my PAD machine is network restricted control by group policy, it does not allow me to access external website and upload files....

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Use VBA or vbscript...Excel VBA macro would be better

    - Paste the first image to a blank Excel sheet.

    • Based on the height of the image calculate its range. For example, for a height of 100, it occupies range A1 to A50. Likewise calculate its column based on the width. Eg column would be H.

    - Then paste the 2nd image after A50 ie; A51

    • Calculate its range too. Lets assume your new range with both the images is upto A100 and columns based on width is H100.
    • Your total new range including both the images is A1 to H100.

    - Now you just need to convert this range into a picture. Use Excel VBAs CopyPicture function of any range in your case A1 to H100.

     

    Below is the VBA function to do that.

    Sub Export()
    
     Dim oWs As Worksheet
     Dim oRng As Range
     Dim oChrtO As ChartObject
     Dim lWidth As Long, lHeight As Long
    
     Set oWs = ActiveSheet
     Set oRng = oWs.Range("A1:H100")
    
     oRng.CopyPicture xlScreen, xlPicture
     lWidth = oRng.Width
     lHeight = oRng.Height
    
     Set oChrtO = oWs.ChartObjects.Add(Left:=0, Top:=0, Width:=lWidth, Height:=lHeight)
    
     oChrtO.Activate
     With oChrtO.Chart
     .Paste
     .Export Filename:="C:\Test\outputsample.jpg", Filtername:="JPG"
     End With
    
     oChrtO.Delete
    
    End Sub
    

     

    Change the path and the Range will be dynamic based on above logic explained.

    I have checked it and its working fine. Converts a given range to an image. 

    Note, this code is only to convert a range of Excel into a picture. For the rest of the code you can search and get it from the internet.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard