pandoc: filename.docx: withBinaryFile: permission denied (Permission denied)

Hello,

Im having issues when rendering my qmd to docx format. Im using quarto 1.5.57. When the rendered docx file is open, I get pandoc: filename.docx: withBinaryFile: permission denied (Permission denied) error in background jobs when I render it again with new edits. So I close the open docx file so that the qmd can render to docx with the new edits. Then I open it again. The thing is the docx will not automatically open so I have to double click the docx file on the file tab to open it. I dont know if its just me. It would be better if when you render the qmd to docx, the docx should automatically open. And that when you add additional edits and render it again, you should not close the open docx and that the opened docx will be updated with the new edits. Also the docx should lead you to where you left at with your work. The render settings is preview in view pane. Can you please help. Thanks

I know this is frustrating. When I began using R, RStudio and Quarto or Rmarkdown I asked the same question. It is not related to Quarto or pandoc. The problem is that when you open a Word document (.docx), Microsoft Word typically locks the file to prevent other programs from modifying it simultaneously.

Check this link which is related to this issue: lock - How to disable MS Word from locking opened files - Super User

I am not an expert in Word so maybe someone that knows more about how this software works will give you a more precise answer and why this aspect was included.

2 Likes