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

Notifications

Announcements

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?
I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard