title: Running Excel Scripts on Outlook Attachments then sending processed files
body: <p>TL;DR: I want to extract an Excel attachment from an Outlook message, automate an Excel script on the unprocessed reports, and then send the output in a new email message.</p>
  <ol>
  <li>I have reports from Amazon that I have sent to a specific email on my Outlook folder each month.</li>
  <li>I set up Power Automate to trigger whenever an email with an attachment is received in this folder.</li>
  <li>I want to take the attachment in this Outlook email and run an Excel script that I build on Excel Desktop (not an Excel application macro) to format the data.</li>
  <li>And then I want to send the output/result (scripted email attachment) as the body of an email out to clients.</li>
  </ol>
  <p>I've gotten the first and last parts to run, but I can't get the script to process the file, that's the phase that always breaks that automation.</p>
  <p><a href="https://i.stack.imgur.com/yqg3U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yqg3U.png" alt="enter image description here" /></a></p>
  <p>Things that I think might be causing the issue:</p>
  <ul>
  <li>Do I need to extract the attachment from the email and save it as a file before I can run the Excel script on it?</li>
  <li>Does the attachment need to be saved through Share Point to be later referenced by the Excel script?</li>
  <li>Does the script need to be on the same or different cards as previous steps?</li>
  </ul>
  <p>I've seen people run the Excel script through a Scope.
  I've also looked at every available YouTube video to troubleshoot this: some go over certain steps in the process, but I'm having a hard time threading everything together.</p>
  <p><strong>Other Things I've Tried</strong></p>
  <p>I also tried to build a macro that does the same thing as my Excel desktop automation, and then wrote VBA code so each time a new sheet is opened the same macro is run, processing the data. But I couldn't get it to run on any new future sheet that I open, even when writing the VBA auto-open code in Module as well as This Worksheet.</p>
  <p>I'm open to any method that will make this work.</p>