Why "bitness" affects badly only DOCX and not DOC files also? Because the office installer registers two different text filter components for DOC (one 32 and one 64 bit), but for DOCX it only adds the "natural" component. To work around this problem I saw people recommending installing the other office filter pack on a 32 bit PC then copying files and registry tweaks to the 64 bit system. The idea works but too much hassle, isn't it?
Registry fix for DOCX text filter
If you are not interested in understanding how the fix works, then just skip this section and get the download below. Otherwise please continue reading. Windows search filters are shell extensions that are implemented as DLLs (a COM object exporting IFilter interface). As a general principle, a process can only load a DLL if it matches its bit depth, so a 64 bit process cannot load a 32 bit DLL and vice versa. In an older article I explained how shell extensions are generally registered under HKEY_CLASSES_ROOT\CLSID registry key. For 64 bit windows, this key is virtualized, so that 32 bit COM objects (DLLs) are registered under HKCR\Wow6432Node\CLSID.
When a process like xplorer² tries to read a DOCX file's contents, it needs its IFilter interface which for this file type is an object with class identifier {5A98B233-3C59-4B31-944C-0E560D85E6C3} (use REGEDIT to snoop the registry for IFilter registration guidelines). If there is a bit mismatch xplorer² cannot load the DLL (say the DLL is 32 bit). The only solution would be to have a 32 bit process load the matching DLL then have this process to talk to xplorer². This is exactly what COM surrogate tries to do. DLLHOST.EXE effectively converts the COM object from inproc to a standalone server.
This aft explanation problably did your head in, but the good news is that the fix is quite simple. You can have the object instantiated automatically with DLLHOST by adding a few registry keys and values, the most important being the AppID with a DllSurrogate value. I have adapted this solution for the peciliarities of the IFilter interface (needs an intermediate PersistentHandler object), and present 2 REG files, one if your office is 32 bit, and one if your office is 64 bit. Most people will need only the former for 32 bit office I reckon.
At present I am working on a solution that will let xplorer² do all the internal 32/64 bit juggling without modifying the registry. It ain't easy but I am optimistic. More on that later!
Post a comment on this topic »