For 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.
You’ll need to open Command Prompt in Admin mode to make the changes especially when User Account Control (UAC) is enabled on your Windows 10 machine. CD to system32 for 64-bit registration and SysWoW64 for 32-bit registration. Place the COM component in the folder from you want to register and also your executable is placed e.g. “C:\Code\bin\” in the example below.
To register use the below command:
To unregister use the below command:
regsvr32 /u "C:\Code\bin\MailObj.dll"
You should get a prompt that the register/unregister command succeeded. This command can be used to register/unregister DLL or OCX files.
Today, one of the users of my application wanted to know if we can find out the original title of a ticket created in the Application. Although, we do not store any such logs for modifications, while on the verge of giving up, I remembered we archive the e-mails received by the Windows Service application that processes the e-mails and archives them at a location on the Server on which it is installed. The e-mail Subject line is stored as the ticket title. These tickets which are created by the Windows Service can be viewed in the Web Application.
Since the folder with the archiving e-mails have a lot of ’em, simply doing a Windows Search is a time killer! So I remembered my way through the good old DOS commands.
Since the .eml file has the ticket number, I used the dir command to search for the e-mail name and copy command to copy it to another location quickly.
Firstly cd to the location where the archived e-mails are stored on the Server:
So e.g. if the ticket number is 123456
dir *123456* /s
The /s searches for the File name inside the two wildcard characters asterisk “*” with the dir command.
Then if the file name is e.g. TICKET123456 – abc.eml then use copy command as follows within the same directory:
copy "TICKET123456 - abc.eml" c:\Temp
So, with the e-mail having the original Subject Line preserved, I could share the original ticket title.