cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
v-bacao-msft
Community Support
Community Support

Hi @Anonymous ,

 

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
yashag2255
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

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!

Anonymous
Not applicable

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?

 

 

Hey @Anonymous 

 

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!

Anonymous
Not applicable

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.

v-bacao-msft
Community Support
Community Support

Hi @Anonymous ,

 

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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,384)