DSOFILE.DLL - not with XML



  • 1. VB Equivilents
    Are there VB.NET equivilents to the 'uint' and 'ulong' keywords as well as the bitwise compliment operator '~' ?
  • 2. Looking for SendInput in VB .Net Example
    Hello, I have code that works fine in VB 6.0 but do to the marshalling differences it doesn't work in VB .Net and I need to get it to work as we are going away from VB 6.0. I am using it to send ScanCodes, but an example that sends Virtual Keycodes is just as good. Thank You DevNick,
  • 3. Detect a Modal Dialog Box
    Hello, I'm thinking this may be an easy one but I am getting frustrated. How can I detect if a process is showing a modal dialog. Like "Are you sure you want to exit?", or an error message etc... I stumbled across the GetWindow API but am unsure how to work it properly. The only examples I found are in VBA or VB6. Private Declare Function GetWindow _ Lib "user32" (ByVal hWnd As IntPtr, ByVal nCmdShow As Int32) As IntPtr Private Const GW_FIRST As Int32 = 0 Private Const GW_LAST As Int32 = 1 Private Const GW_NEXT As Int32 = 2 Private Const GW_PREV As Int32 = 3 Private Const GW_OWNER As Int32 = 4 Private Const GW_CHILD As Int32 = 5 Private Const GW_STYLE As Int32 = (-16) Private Const WS_DISABLED As Int32 = &H8000000 Am I on the right track here or is the above even correct...can someone give me a kickstart? Or is there an even simpler method to detect a modal dialog? Thanks for your help! Jeremy

DSOFILE.DLL - not with XML

Postby uncleharpoon » Fri, 27 Aug 2004 00:11:07 GMT


Anyone have any quick ideas as to why we can write extended file
properties with dsofile.dll to all sorts of file formats - but not

Even in Word 2003, when I save as DOC extended file properties appear,
but save as XML - they don't.

Is this a Windows issue or a restriction in the DLL?



Similar Threads:

1.dsofile.dll not working on all files?

Hello everybody!

I used some code for extraction of the doc Properties. It is working great
for some documents and on the other hand it does not work for a bunch of
When I check in the file with Word I find the properties all set but I can't
read them with dsofile.dll :(
Is there any idea? Can I fix this? It's for some hundred documents so if
there is a macro way ;)

Thanks a lot

2.DSOFile.dll or DSOleFile.dll - which one???

I have been pondering over this one all night!! I want to read the
properties of a Word document WITHOUT opening it - notably the title
document. Having read the newsgroups it seems that I neede to download from
the MS site the DSOFile package containing the said DLL. However on looking
in the newsgroups the best option to me seems to be using the
DSOleFile.PropertyReader and then the GetDocumentProperties property, but
this seems to be associated with the DSOleFile.dll file which I do not
have - and cannot find, although this is mentioned in the same postings re
DSOFile.dll. Can someone help me out with this one - I am very confused. As
I understand it of I use DSOFile.dll I would have to open the Word document
before getting the properties. I am accessing maybe up to 100 word documents
at a time across a network and then I want to load the file titles into a
treeview. Help please.

Best wishes

Paul Bromley


I am using the DSOFILE DLL to read and append file 
properties.  Whenever I access a file this DLL opens it to 
read the properties but leaves it in an open state until I 
select another file.  

How can I close this file after reading the properties?

Thanks for any help 

4.novice: dsofile.dll -> template path

dear vba gurus,
i'd like to read the template path of a few hundreds doc's in  a directory.
for that reason i created a vba script to access the doc-properties (with
the help of dsofile.dll).
 is there a way on how i can access the path and the name of the document
template ?

thank you very much


Hi All,

I'm trying to read some custom document properties from MS Word docs from 
within Excel. I've found a VB.NET sample that uses the dsofile.dll and this 
seems to be what I want, but I am not very familiar with VBA, so I'm having 
some difficulty getting the VB.NET code translated to work within VBA.

I've searched around google and have not found anything except that many 
people say that it should be easy to make the dll work using VBA (though I 
haven't seen any proof of how easy it is or that it actually works)

Basically, what I want to do is use a filesearch to generate a foundfiles 
object with all of the word documents in a directory, then loop through the 
files and get the custome properties. Below is what I'm trying.

I get a permission denied error when I get to opening the file. I've tried 
using the ReadOnly options, but VBA complains if I try to add more than just 
the file name argument:

Dim DSO As DSOFile.OleDocumentProperties
Dim CP As DSOFile.CustomProperty

With Application.FileSearch
    .LookIn = ActiveWorkbook.Path
    .FileType = msoFileTypeWordDocuments
    If .Execute > 0 Then
        For i = 1 To .FoundFiles.Count
            Set DSO = CreateObject("DSOFile.OleDocumentProperties")
            DSO.Open (.FoundFiles.Item(i)) 'permission denied
            'DSO.Open(.FoundFiles.Item(i),True) ' VBA error saying it 
expects an =
            For Each CP In DSO
                If CP.Name = "Eval_Period" Then
                    If CP.Value = "4th Quarter, 2005" Then
                        If CP.Name = "TK" Then
                            If CP.Value = "VG" Then
                                TKVG = TKVG + 1
                            ElseIf CP.Value = "G" Then
                                TKG = TKG + 1
                            ElseIf CP.Value = "N" Then
                                TKN = TKN + 1
                            ElseIf CP.Value = "NG" Then
                                TKNG = TKNG + 1
                            End If
                        End If
                    End If
                End If
            Next CP
        Next i
    End If
End With

Has anyone used the dsofile.dll in VBA (Excel) with any success? If so, can 
someone give me a little code snippet showing how to use the functions in 


6. "dsofile.dll" documentation?

7. dsofile.dll

8. Problem with dsofile.dll and vbscript

Return to VB.NET


Who is online

Users browsing this forum: No registered users and 75 guest