1

I'm trying to use Dsofile with a VBS script on a Windows 7 64-bit machine. I believe my issue is with registering the DLL.

I used this to register the DLL

regsvr32 D:\Desktop\dsofile.dll

and am told that

"DllRegisterServer in D:\Desktop\dsofile.dll succeeded."

leading me to believe that everything worked. When I try to run the test code that Microsoft gives

Set objFile = CreateObject("DSOFile.OleDocumentProperties")
objFile.Open("D:\Desktop\test.xls")
Wscript.Echo "Author: " & objFile.SummaryProperties.Author

it fails on the first line, stating that

"ActiveX component can't create object: 'DOSFile.OLEDocumentProperties"

which leads me to believe that the DLL did not actually register correctly.

I then tried registering the DLL, based off this solution, by doing the following

cd \Windows\SysWOW64
regsvr32 C:\dsofile.dll

It also informs me that it registered correctly, but once again the script fails on the first line.

How can I fix this, so that I can use Dsofile?

Thanks.

Community
  • 1
  • 1
James Mnatzaganian
  • 1,255
  • 1
  • 17
  • 32
  • 2
    You'll have to use the 32-bit script interpreter from c:\windows\syswow64. You'll need to wean yourself off dsofile, it has no future. – Hans Passant Dec 05 '12 at 15:00
  • Using `C:\Windows\SysWOW64\cscript.exe test.vbs` to execute the script fixed the problem. Thank you. – James Mnatzaganian Dec 06 '12 at 03:32
  • @HansPassant: Why not post that as an answer? – Helen Dec 06 '12 at 14:48
  • Because there are thousands of programmers that depend on dsofile that will take out their anger at me. They do shoot messengers around here. – Hans Passant Dec 06 '12 at 14:59
  • 1
    @HansPassant, You are right. I am one of the programmer in that thousand. What is your alternate for DSO ? Is it the Open Office SDK? – Joy George Kunjikkuru Apr 23 '13 at 14:44
  • A "robert8w8" recompiled the DSOFile.dll for 64 bits and posted at CodeProject: https://www.codeproject.com/Tips/1118708/Bit-Application-Cannot-Use-DSOfile ... I used this DLL on a small VBA project of mine with no errors. However, it didn't work for me because I'm trying to update metadata on a MP4 file. And I haven't found a way to do this, yet. – Paulo Santos Aug 19 '23 at 10:22

0 Answers0