Skip to main content

Notifications

Community site session details

Community site session details

Session Id : WDw6X67AG6yf0EbGLt4EuD
Power Automate - Power Automate Desktop
Answered

Open .pdf file in Edge

Like (1) ShareShare
ReportReport
Posted on 16 Jul 2024 10:17:43 by 46

Goodday,

 

I'm struggling to open pdf files in the Edge browser. Anyone knows how to open local .pdf files within a Loop command?

 

When I use a "Go to web page" command and specify the URL with local file Edge fails over whitespaces which I can't seem to replace with %20 (anyone knows how to?).

When I use "Run Application" with Edge and local file as Command line argument it opens several tabs for each whitespace within the %filename%. 

 

A replace text for the whitespace to %20 would probably suffice in this.

 

P.S. I want to keep Adobe as my standard PDF application; for this specific process I want to open these files in Edge.

  • CU16080833-2 Profile Picture
    46 on 16 Jul 2024 at 13:01:21
    Re: Open .pdf file in Edge

    Hi EetuRobo,

     

    Thanks for the quick response! This Text action resolved the issue like you suggested!

     Furthermore, I found out that to open a local file with Edge one should always add a "file:///" subtext to the URL-string. I'm now launching a new Browser for each file to handle, instead of working with tabs. 

  • Verified answer
    eetuRobo Profile Picture
    3,273 Super User 2025 Season 1 on 16 Jul 2024 at 11:40:31
    Re: Open .pdf file in Edge

    As you suggested changing the whitespace to %20 will work when using Run application -action.

    Since PAD uses % -signs to refer to variables you need to use extra % -sign if you want to replace empty space with %20.
    So to Replace with: %%20 (that will replace the text to %20)
    like so:

    eetuRobo_0-1721129852820.png

     

    This worked for me with pdfs that has whitespaces in the name:

    eetuRobo_1-1721129945114.png

     

     

     

  • VishnuReddy1997 Profile Picture
    2,324 Super User 2025 Season 1 on 16 Jul 2024 at 11:10:30
    Re: Open .pdf file in Edge

    Hi @Martvis88 ,

     

    Instead of this you try changing the setting in System.Please find the steps for this.

     

    1.Open Settings by pressing the Windows key + I.
    2.Click on Apps.
    3.Select Default apps from the left sidebar.
    4.Scroll down and click on Choose default apps by file type.
    5.Find the file type for PDF files (usually .pdf).
    6.Click on the currently associated app.
    7.Select Microsoft Edge from the list of available apps.

    VishnuReddy1997_0-1721128205508.png

     


    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 18 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 6

#2
John_Mavridis Profile Picture

John_Mavridis 6 Microsoft Employee

Overall leaderboard