
I have a list of outlook .msg files that contain PDF attachments. I have to save these attachments into a folder, open them and then screenshot that PDF attachment, put it back into an excel sheet.
Since all UI actions like 1. Click on File Tab 2. Save attachments, that are performed with outlook file only work on that particular outlook file, when i open another outlook.msg file, i am unable to create a dynamic flow where in i can open outlook.msg files one after the other and perform the same action of saving attachments.
How do i solve this?
The main reason why the UI elements don't work for different files are because your element selector likely has a file name in them. You need to modify the selector to not contain it.
For instance, if I capture an element in an Outlook message, there will be an element and a parent window element in the controls repository:
And both of them will actually contain the subject text of the message.
Here's the one for the button:
And here's the one for the window:
Both of these need to be modified to not include the name, but instead use some other parameters. Do that and it should work dynamically for you.
See this article for some more references on how to modify selectors: https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors#use-variables-in-a-custom-selector
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.