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 / Microsoft Power Automa...
Power Automate
Answered

Microsoft Power Automate Desktop - Paste Screenshot in Excel Worksheet

(2) ShareShare
ReportReport
Posted on by 11
I am using Microsoft Power Automate Desktop. I want to take screenshot of current application present on screen(web application / desktop application...) and add that screenshot in new worksheet of excel. How to do that?
Capture.PNG
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
     
    Try this vbscript using run vbscript action - this helps to paste an image file to the excel cell range in sheet.
     
    Dim objExcel, objWorkbook, objWorksheet, objImage
    Dim cellRange, imagePath,excelfilepath,sheetname
    ' Define your variables
    sheetname="%sheetname%"
    cellRange = "%CellRange%" ' Change to your desired range
    imagePath ="%ImageFile%" ' Change to your image file path
    excelfilepath= "%FilePath%"
    
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = False  ' Make Excel visible
    
    Set objWorkbook = objExcel.Workbooks.Open(excelfilepath) ' Change the file path
    Set objWorksheet = objWorkbook.Sheets(sheetname) ' Select the first sheet
    
    ' Add the image to the worksheet
    Set objImage = objWorksheet.Pictures.Insert(imagePath)
    
    ' Set the image position based on the specified range
    objImage.Left = objWorksheet.Range(cellRange).Left
    objImage.Top = objWorksheet.Range(cellRange).Top
    
    ' Resize the image to fit within the specified range
    objImage.Width = objWorksheet.Range(cellRange).Width
    objImage.Height = objWorksheet.Range(cellRange).Height
    
    ' Save and close workbook
    objWorkbook.Save
    objWorkbook.Close
    objExcel.Quit
    
    ' Clean up
    Set objImage = Nothing
    Set objWorksheet = Nothing
    Set objWorkbook = Nothing
    Set objExcel = Nothing
     
     
    I have tried below sample flow to test its functionality.
     
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • PS-05051208-0 Profile Picture
    11 on at
    @Nived_Nambiar Thanks for you answer it worked for me. Can you please do the same for CSV file? That would be really helpful. Thanks :)

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard