English 中文(简体)
Unable to read Office 2007 doc props using x86 dsofile.dll on x64 system
原标题:

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 returned

Environment: Office 2007 Compatibility Pack installed
Read DOC props: OK
Read DOCX props: Empty values returned

Environment: Office 2007 Compatibility Pack SP1
Read DOC props: OK
Read DOCX props: Empty values returned

Environment: Office 2007 installed
Read DOC props: OK
Read 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 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

问题回答

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





相关问题
Call Excel COM Addins functions using macro

How can I call a function defined in a COM Addin using excel macro ? Basically I have created a Excel COM Addin which does some bunch of stuff. Now I want to invoke this via excel macros. Is it ...

Stylesheet of Office2007

Where from I get a stylesheet of Office 2007 Blue for my controls like button, Dropdown list, gridview etc for my ASP.NET Application.

Command line switch for Word that will set the SaveAs Path

I am looking for the switch that will set the default SaveAs path for a word document when calling it from the command line. It seems like the /p parameter exists for Excel but I haven t found any ...

Access Document Stream from Office Ribbon Code

I am attempting to write an add-in for Microsoft Word 2007. I d like to create a Ribbon Button that when clicked, gets a FileStream for the current or active document. I would assume that is possible ...

Hyperlink disappears when form template saved

I have an InfoPath form with several fields on, the problem is that one of the fields is a hyperlink and every time I save the form template, close it and open it again the hyperlink is gone. I know ...

热门标签