M
Martyn
I am trying to display the properties of a file.
But I keep getting a "user-defined" error on the
Dim DSO As..........line of the macro.
Can someone correct me please?
--------------------------
Private Sub Workbook_Open()
Dim FileName As String
Dim DSO As DSOleFile.PropertyReader
Set DSO = New DSOleFile.PropertyReader
FileName = "D:\Sitem_Excel\motor.xls"
With DSO.GetDocumentProperties(sfilename:=FileName)
Debug.Print .AppName
Debug.Print .Author
Debug.Print .ByteCount
Debug.Print .Company
Debug.Print .Title
Debug.Print .Subject
Debug.Print .Author
Debug.Print .Category
Debug.Print .Keywords
Debug.Print .Comments
End With
End Sub
But I keep getting a "user-defined" error on the
Dim DSO As..........line of the macro.
Can someone correct me please?
--------------------------
Private Sub Workbook_Open()
Dim FileName As String
Dim DSO As DSOleFile.PropertyReader
Set DSO = New DSOleFile.PropertyReader
FileName = "D:\Sitem_Excel\motor.xls"
With DSO.GetDocumentProperties(sfilename:=FileName)
Debug.Print .AppName
Debug.Print .Author
Debug.Print .ByteCount
Debug.Print .Company
Debug.Print .Title
Debug.Print .Subject
Debug.Print .Author
Debug.Print .Category
Debug.Print .Keywords
Debug.Print .Comments
End With
End Sub