cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Learnfromyou
Level 8

MS Word in SharePoint - this document can't be opened for editing. Flow is corrupting Word in Sharepoint?

I am trying to populate a Word Template then when the Word is created and saved in my Sharepoint, then when I go open that file it gives me an error - "Sorry, this document can't be opened for editing." Thus the flow fails to the next activity for Convert Word Document to PDF.  It was working fine for couple days since I implemented this. But all of a sudden it happened.  I tried to delete that Word file completely and same result. I even renamed the Word file to something else and no luck.

Word Locked.JPGWordToPDFerror.JPG

 

My flow
Word Flow.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: MS Word in SharePoint - this document can't be opened for editing. Flow is corrupting Word in Sharepoint?

Hi @Learnfromyou ,

 

Please try to move Create file action and Convert Word Document to PDF action to Apply to each to exclude the "this document can't be opened for editing" error.

9.PNG

 

In addition, I have tested it in my case. Convert Word Document to PDF action needs to use File Browse to specify the file. Currently, Dynamic content and Expression are not supported to configure file path.

If you want similar features to be supported by MS Flow, please consider voting for similar ideas below:

Word-Online-PDF-Converter-should-take-dynamic-file-input

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

Re: MS Word in SharePoint - this document can't be opened for editing. Flow is corrupting Word in Sharepoint?

Hi @Learnfromyou 

 

In the Create file action of the flow, please make the following changes:

 

1. file extension to be .doc not .docx.

2. In the file content, remove the selected value and get into the expression editor. type binary() and within the brackets, select the option of word document from the dunamic selector. 

 

Please make the above changes and run the flow and check if you continue to get the error. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Learnfromyou
Level 8

Re: MS Word in SharePoint - this document can't be opened for editing. Flow is corrupting Word in Sharepoint?

yeah I tried the exact steps you provided and did not work.  What worked was I have to go another folder where I place the Create Word file at.

 

It is very strange, the permission is exactly the same and that new folder is just one level above the existing folder. So to sum up, I just have to point to another folder all of a sudden? It was working perfectly fine for many weeks till yesterday. Did my folder cause some kind of corruption?

 

 

Dual Super User
Dual Super User

Re: MS Word in SharePoint - this document can't be opened for editing. Flow is corrupting Word in Sharepoint?

Hey @Learnfromyou 

 

I don't think that the folder might have been an issue. Either there was a file that got corrupted and the flow is updating the corrupt file. One other reason could be due to caching. Can you try creating another file (a test file from a new flow) and see if you get the error? That way we can get a certain reason for this behaviour. Makes sense?

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Learnfromyou
Level 8

Re: MS Word in SharePoint - this document can't be opened for editing. Flow is corrupting Word in Sharepoint?

yes, I tried to use a new flow and saved that Word (using different name) and save it at the same folder location and have the same issue.

Community Support Team
Community Support Team

Re: MS Word in SharePoint - this document can't be opened for editing. Flow is corrupting Word in Sharepoint?

Hi @Learnfromyou ,

 

Please try to move Create file action and Convert Word Document to PDF action to Apply to each to exclude the "this document can't be opened for editing" error.

9.PNG

 

In addition, I have tested it in my case. Convert Word Document to PDF action needs to use File Browse to specify the file. Currently, Dynamic content and Expression are not supported to configure file path.

If you want similar features to be supported by MS Flow, please consider voting for similar ideas below:

Word-Online-PDF-Converter-should-take-dynamic-file-input

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,262)