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 Apps / how to open a word doc...
Power Apps
Unanswered

how to open a word document in the client from power apps

(2) ShareShare
ReportReport
Posted on by 407

Hi all,

 

I'm trying to open a word document in edit mode that resides in a SharePoint document library via Power Apps button. I tried the below code but client word is giving me an error message. 

 

Tried this: 

Launch("ms-word:ofe|u|https://sharepoint.com/document.docx")

The file opens blank. 

When I try this: 

Launch("ms-word:ofv|u|https://sharepoint.com/document.docx")

It opens a blank document with the link on top saying 'READ_ONLY We opened this document read-only from the server'. 

I do have the option to click on the button that says 'Edit Document', but then I get this error message: 

Unknown error trying to lock file

Any thoughts on this? 

Thanks

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @_sourcecod3_ ,

     

    1\ Please make sure you are using the correct file URL.

    vxiaochenmsft_0-1678673919518.png

    vxiaochenmsft_1-1678673946863.png

     

    2\ Please use ms-word:ofe|u| instead of ms-word:ofv|u|.

    It will open the .docx file in edit mode.

     

    Best Regards,

    Wearsky

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @v-xiaochen-msft , 

     

    I have verified the URL is correct and the file exists in the SharePoint document library. When i changed it to ms-word:ofe|u| it opens up a blank document. 

     

    Any clues as to why that happens? 

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @_sourcecod3_ ,

     

    No idea. It worked for me.

     

    Best Regards,

    Wearsky

  • _sourcecod3_ Profile Picture
    407 on at

    @v-xiaochen-msft is the document you tested opens up in edit mode in the client? no errors?

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @_sourcecod3_ ,

     

    Yeah, it is opened in the desktop in edit mode.

     

    Best Regards,

    Wearsky

  • HKICE Profile Picture
    239 on at

    I have the same issue where the document opens as a blank document in READ-ONLY mode !

    Were you able to solve this ?

  • _sourcecod3_ Profile Picture
    407 on at

    Not yet. We just started having the users open the file in browser then make edits in client app.

  • susanclark Profile Picture
    on at

    I am looking to open This.Item. If I do just that - it opens fine but online word.

    When I add the MS-word & This.Item I get a blank document that is read only 

    susanclark_0-1697712333139.png

     

  • susanclark Profile Picture
    on at

    I found my solution finally! Open Word document (SharePoint doc library) in Word Desktop in Power Apps Gallery:   Launch("ms-word:ofe|u|" & First(Split(ThisItem.'Link to item',"?")).Value)

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard