我们有一个32位的.NET应用程序,它利用32位版本的Office2.1从DSOFile.dll文档中读取常见属性。在这个64位环境中,DSOFile.dll可以成功地从Office2003文档中读取属性(例如,文档),但对于Office 2007文档(例如DOCX),则只为所有属性返回空字符串,否则将生成错误。props: Error message = "document is not a OLE file“
在64位系统上,我使用位于%SystemRoot%\Syswow64中的regsvr32副本来注册dsofile.dl
aryFiles As IO.FileInfo() = di.GetFiles("*" & ext_to_check) Dim dso As DSOFile.OleDocumentProperties'Loop through all files in the search directory dso = New DSOFile.OleDocumentProperties
使用DSOFile,我已经添加了摘要信息。这个works...or至少我认为在关闭和打开文件后,摘要信息是可见的(使用DSOFile查看器,而不是Adobe)!Dim oDocument As DSOFile.OleDocumentProperties = New DSOFile.OleDocumentProperties
oDocument.Open(FileName, False, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAcc