I have tried re-downloading Microsoft Word, Excel multiple times and restarting before trying. However, this problem still persists.
This problem is applicable to all my documents, even PDFs too.
However, when I Command + O in the app itself, the document can be opened and functions normally.
The problem happens if I directly double-click or open the files from Finder.
Please advise me on how I can solve this issue.
Best Answer
Apparently the document has a quarantine flag. You can verify the same by running the following command in the Terminal.app:
xattr <path_to_the_document>
which should display the following:
To remove the quarantine flag from a document you trust is coming from a reliable source, run the following command:
xattr -r -d com.apple.quarantine <path_to_the_document>
The Terminal.app would ask you to enter your admin/login password. You can verify that the flag is removed by re-running the former command mentioned above.