When opening, creating or saving an Office document, spreadsheet or presentation on SharePoint Document Library or Microsoft OneDrive (can be part of Office 365 service) with Microsoft Office applications such as Word, Excel or PowerPoint , the following warning message may appear:
Some files can harm your computer. If the file information below looks suspicious, or you do not fully trust the source, do not open the file.
File Name: sample.docx
Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source.
Do you want to open this file?
Program: Microsoft Word
The warning message is a security feature of Microsoft Office to protect against malicious attack. This is because editing the file in the cloud with a local application requires Office program to download a temporary file to local device before you’re able to view and edit it.
To resolve the issue where the warning message appears every time you try to open a file stored in SharePoint or OneDrive, try one of the following methods.
Add the URL of SharePoint or OneDrive as Trusted Sites
- Open Control Panel.
- Go to Network and Internet -> Internet Options.
- In the “Internet Properties” dialog, go to Security tab.
- Select Trusted sites zone.
- Click or tap on Sites button that appears.
- Enter the domain part of the URL of the SharePoint or OneDrive storage space in the text box under “Add this website to the zone” heading, and hit the Add button. For example:
- Open the Office file again and the warning prompt should be gone.
Install OneDrive or OneDrive for Business Client
Installing OneDrive or OneDrive for Business client to sync the files between local PC and the files on the cloud in OneDrive or SharePoint.
With OneDrive client, all files can be accessed in File Explorer or Windows Explorer in a local folder. After syncing the files, create, save and edit the local files with Office applications, which then will be synced automatically to the cloud by the client. As the files are now local (not downloaded from Internet), no warning will be prompted.