I have an Intranet Application where a .docm template downloaded from a ReactJS UI as a blob is opening in Protected View on the users’ machines. This is happening when downloading in browsers other than IE or Edge browser in IE mode.
When you download the document from Chrome or other browsers, MS Word is considering it as an Internet Application. Hence, the checkbox for Protected View is applying these changes and downloading it in Protected View.
The code to download this as a blob is in ReactJS is available here.
var downloadUrl = response.data.Path; const link = document.createElement("a"); link.id = "DownloadLink"; link.href = downloadUrl; link.setAttribute("download", "filename"); document.body.appendChild(link); link.click(); document.getElementById("DownloadLink").outerHTML = "";
This will prevent it from opening in Protected View.
Also, if your word file has Macros, read-only fields become editable when you click on “Enable Editing” when you open the document in Protected View until you enable the Macros.