OK, I believe I have your answer
I created a .xls file, and saved it. While saving, I used the Save dlg's ability to password protect, and protected to open (not merely to modify).
Then I created a VBA project.
I added a reference to "Microsoft Shell Controls and Automation"
(C:\Winnt\System32\shell32.dll)
Then I added the following code, and ran it from the Debug window
Code:
Public Sub ab()
Dim i As Integer
Dim sh As New Shell ' This class comes rom Shell32
Dim FldrItm As FolderItem ' This class comes rom Shell32
Dim fldr As Folder ' This class comes rom Shell32
Set fldr = sh.NameSpace("C:\ . . . \My Documents\")
Set FldrItm = fldr.ParseName("Book1.xls")
For i = 0 To 30
Debug.Print i, fldr.GetDetailsOf(FldrItm, i)
Next i
End Sub
The result I got was as follows (bold items are ones that I added in the File|Properties... in Excel before saving)
Code:
0 Book1.xls
1 14 KB
2 Microsoft Excel Worksheet
3 8/22/2007 14:17
4 A
5 These are the Comments
6 8/22/2007 14:15
7 8/22/2007 14:17
8 NADSUSWE\brian.wren
9
10 brian.wren
11 This is the Title
12 This is the Subject
13 This is the Category
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Obviously, you can choose where you would like to stash your identifying data, but you can read these properties without having the password for the file...