We have a 32-bit .NET application which makes use of the 32-bit version of DSOFile.dll 2.1 to read common properties from Office documents. This works on 32-bit versions of Windows, for both Office 2003 and Office 2007 documents. We are now examining our application’s behaviour in a 64-bit environment, and specifically in 64-bit Windows Server 2008.
In this 64-bit environment, DSOFile.dll can successfully read properties from Office 2003 documents (eg. DOC), but in the case of Office 2007 documents (eg. DOCX), only empty strings are returned for all properties, or else an error is generated.
Here are my observations:
Environment: clean install
Read DOC props: OK Read DOCX props: Empty values returnedEnvironment: Office 2007 Compatibility Pack installed
Read DOC props: OK Read DOCX props: Empty values returnedEnvironment: Office 2007 Compatibility Pack SP1
Read DOC props: OK Read DOCX props: Empty values returnedEnvironment: Office 2007 installed
Read DOC props: OK R开发者_开发问答ead DOCX props: Error message = "document is not an OLE file"On the 64-bit system I used the copy of regsvr32 located in %SystemRoot%\Syswow64 to register dsofile.dll.
Any advice would be greatly appreciated.
You can find the DSOFIle source code (have a look on google) and compile it for 64bit, or try this link which someone says they have already done it: http://www.keysolutions.com/blogs/kenyee.nsf/d6plinks/KKYE-79KRU6
I've also got a x64 version here if you need it I can upload it.
It may not directly be related to your issue but if you wanted to try it, I've used x86 and x64
You can compile your application to x86 instead of AnyCPU, then it will work fine on x64 Windows.
Another possible way is to use Open XML SDK 2.0 for Microsoft Office. See if it supports x64 applications.
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en
精彩评论