Whenever I try to open a LibreOffice document of any type for editing in any folder on on my computer, I get this error message:
I have looked at other posts on this forum (and other areas online) regarding this error message and tried the following, but to no avail:
-
Turning off controlled folder access - I’m not using Windows Defender, so this does not apply to me. Just to be sure that this wasn’t the root cause of my issue, I also opened gpedit.msc and looked under Computer Configuration → Administrative Templates → Windows Components → Microsoft Defender Antivirus → Microsoft Defender Exploit Guard → Controlled Folder Access and verified that “Protected Folders” were not configured.
-
Toggling on “Run this program as an administrator” for the LibreOffice executables in the C:\Program Files\LibreOfiice\program directory (in this case soffice.exe and swriter.exe) for both my user account did not work. Toggling this on for all users also did not resolve the issue. Granting these applications administrative access caused the UAC window to pop up when either launching LibreOffice or trying to open a document directly from a folder, but the “Document Could Not Be Locked” error message still persisted.
-
I have several systems with LibreOffice installed on them. I checked the security permissions for the affected folders on the malfunctioning machine against a computer where LibreOffice is working properly and the permissions are identical (Full Control for System, Administrators, and my User Account), so I don’t think folder security permissions are the issue here (though I suppose I could be wrong). None of the files or folders affected by this error message are being synced to the cloud via DropBox or the like.
-
I tried uninstalling and reinstalled LibreOffice, but with no success. I also tried downgrading and upgrading the version number of the software, but that didn’t fix anything either.
Going to Tools -> Options -> LibreOffice -> Advanced -> Button: Open Expert Configuration -> Search: UseLocking
and set org.openoffice.Office.Common\Misc\UseLocking
to false
seems to resolve the issue. Once this change is made, LibreOffice is able to modify and save documents in the affected directories despite the fact that it could not create a lock file. While this workaround is a fine temporary fix, I would prefer to fix the root cause of this issue then subvert the file locking process altogether.
Interestingly enough, I installed Apache OpenOffice 4.1.14 and it is able to create lock files in the affected directories without any issues.
Does anyone here know how I might be able to properly resolve this issue? If not, should I file a ticket with the LibreOffice team to investigate this issue?
Thanks in advance for your assistance!