I'm having an issue previewing Office files, specifically Excel, but I haven't really tested with other documents.
This is what I see in the preview pane:
This Microsoft Office document could not be displayed.
This could mean one of the following:
- Microsoft Office is not installed.
- Office is installed, but its preview handler is broken.
- Office's preview handler could not open this particular file.
- Anti-malware software is blocking access to the document.
Repairing or (re-)installing Microsoft Office is recommended if:
- File Explorer's preview pane also cannot display the document.
- The problem affects all documents of the same type.
In File Explorer I am able to preview it correctly, but not in DO. If I open the file, Excel opens it in protected view and I have to click "Enable Editing". If I do that, then the preview in DO starts working.
As you can imagine, this is extremely annoying and makes the preview pointless if I had to open it anyways.
What do I need to do to get previews for Office documents working as expected?
Try repairing Excel via its installer, and if it still doesn't work try resetting Opus's MetaPlugin configuration to defaults (Preferences / Viewer / Viewer Plugin, then configure MetaPlugin and click Defaults).
I use Malwarebytes and I turned off all real-time protection and I also added DO install folder to Allow List in Malwarebytes. Still having the same issue.
Yes, generally when I have this issue, if I open it in Excel, Excel will prompt me saying it opened it in read only mode and presents a button "Enable Editing" that allows me to edit it. I can close Excel after and the preview works on that file.
When the preview does work, the title bar of the viewer says the name of the file and (Microsoft Excel).
Ok, so I believe I tracked down what may be causing the issue.
If I open the properties of the file, in the General tab, at the bottom, it says "Securty: This file came from another computer and might be blocked to help protect this computer."
If I check the option to "Unblock" the file, then the preview in Directory Opus works.
But I don't have to do this for Windows File Explorer. So it seems that Windows may be using something else to preview the Excel file that doesn't get blocked, but whatever Directory Opus is using does get blocked.
Try configuring the MetaPlugin (Preferences / Viewers / Viewer Plugins) and selecting Excel at the top, then turning on Open Temporary Copies. That may avoid the issue.
Ok, scratch what I thought about Windows File Explorer not having this issue. Apparently I must have clicked the "Enable Editing" on all these files. I was able to find one file that I hadn't clicked this and that one does not work in Windows File Explorer either.
So the issue is exactly what Windows says it is, since it's a file that was downloaded, Windows is the one that is blocking it and I have to explicitly tell Windows to unblock it.
This is what has to be checked to unblock it in case you want to include this troubleshooting step in error message that you display when the preview could not be displayed.
The reason is in the Office Options / Trust Center Settings.
On the Trusted Locations tick Allow Trusted Locations on my network.
On the ActiveX Settings choose Enable all controls... and untick Safe mode.
On Protected View untick all items
For Word and Excel these settings need to be set separately
P.S. I think it usefull only for Office 365 or any, which opens documents with a request to Enable Editing.