Automatically Granting Access to folders and docx files to Microsoft Word
I am working on a React/Django project which uses user input to populate a template Word document. I have no granting access issues when creating the new docx file with the rendered data using the "docxtpl" module; however, when I use the convert method from the"docx2pdf" module to convert the newly created docx file to a PDF, I have to grant Microsoft Word access to the file manually.
This is a problem because anytime a user completes the frontend form, I would have to give Word access to the file to complete the conversion to send the PDF back to the frontend. I have given Word, Python IDLE, VSCode, and even pip3 full disk access in my system preferences. I have also attempted to save the document directly to my desktop and then move it to the proper folder after converting it, to no avail. I have also tried to change the sharing and permissions of the folder containing the needed folders/files to read and write for all available options, but the settings revert after some time back to read-only.
This problem only appears for new files, but if I convert the file to a PDF and then grant access, delete the files and re-run the program with the same file name, I do not have to grant access to that file, and everything works properly. I am running Microsoft Word Version 16.68 and am on macOS Ventura 13.1. Ideally, I would like the folder containing all the needed folders/files inside my Django application, but I'm unsure how to bypass or automatically grant access to the forced grant access prompt.
MacBook Air 13″, macOS 13.1