Change location for Microsoft Office ~$ temporary files

file locationmicrosoft-officetemporary-files

When we open a Microsoft Office spreadsheet or document, generally a temporary file with the name starting with "~$" is created near the main file. If we can't turn off this behavior, is there a way to specify a custom location for those temporary files (for instance, C:\Temp)?

What I am trying to do is to exclude those files from syncing done with the Google Backup and Sync tool, which still does not provide us with a built-in option for that.

Best Answer

According to the Microsoft support article Description of how Word creates temporary files:

The location where Word creates the temporary files is hardcoded information and cannot be edited.

While the article specifically mentions Word, this holds true for other Microsoft Office applications.

As long as the Office app is closed properly, the temp file is automatically deleted. Only when the app is closed abnormally will these files persist.