Overview
With the product M-Files for Outlook, an add-in is being used, also called Outlook Add-In or Office Add-In. In problematic cases, very often the logs are truncated.
Notes
- This article pertains to logs related to the built-in add-in that comes with the M-Files Desktop installation. There are other Outlook add-in options that M-Files offers, but they are separate installations and have separate logging that is not affected by the behaviors and settings described here.
- Outlook is an example here; the same applies to any MS Office application - there are add-ins that come with the M-Files Desktop installation for Excel and PowerPoint as well.
Solution
Some extra steps are required to enable working text (LOGW) logging when an MS Office application is used with M-Files Office Add-In. In the following, we will take Outlook as an example application. It is possible that Outlook considers M-Files Outlook Add-In as faulty, because of its consumption of time and CPU resources.
We are trying to ascertain that flushing the log file finishes (i.e., the log file does not come out as truncated) and, hence, no logging is lost.
Prerequisite: An M-Files installer has been run on a version with the intended logging additions. At least a desktop has been installed. The changes reside in MFOfficeAddin.dll.
Step by step:
- Optionally, go to %TEMP%\MFilesLogs and clean it out (i.e., remove old logs) so that the old logs do not make it harder to distinguish the new ones.
- Ensure LoadBehavior is set to 3 under HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook\Addins\MFOfficeAddIn.Connect.<your version>. The current default value is 3.
- Exit Outlook. Exit all other Office software. This is to establish that the old M-Files add-in DLL will not be used.
- Enable logging as you are supposed to (exit Outlook, set Enabled and EnableVerboseLogging to 1 in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<your version>\Client\MFOfficeAddIn\Logging). Some other values for EnableVerboseLogging are sometimes required depending on what accuracy of logging we are using. You will be instructed by M-Files Support for different values.
- Start Outlook, wait for it to fully initialize, give it 10-15 seconds. Do your test sequence that is intended to provide the logging.
- Steps 5 - 7 are necessary to make sure that flushing happens for the logging and, thereby, no information is lost.
- In Outlook, go to File > Options > Add-ins >. At the bottom of the Manage dropdown choose COM Add-ins > Go >. Unselect the checkbox in front of the M-Files add-in. Press > OK.
- Wait for 10-15 seconds, exit Outlook, wait for another 10-15 seconds.
- The log file should now reside in %TEMP%\MFilesLogs. Send it to M-Files Support for examination (see How to send files via Cryptshare portal).
- Start Outlook, go to the add-ins settings again and select the checkbox in front of the M-Files add-in so you can use the add-in again.
Pitfalls
Sometimes Outlook thinks that the add-in is too sluggish at start-up. In File -> Info -> Slow and disabled add-ins you may find that your add-in is on the list. Check "Always monitor this add-in."
