Accessing document properties of non-Microsoft product files

  • Thread starter Thread starter Kevin Beckham
  • Start date Start date
K

Kevin Beckham

For Microsoft product files, we can access the file
properties using code of the form:
myComment = ActiveWorkbook.BuiltInDocumentProperties
("Comments")

How can I read and write to the "Comments" property of a
non-Microsoft file, as displayed when you select the
Properties menu item of a file in say Explorer ?
This information doesn't appear to be part of the file as
a zero size file that has a comment remains size zero.

Kevin Beckham
 
When I rightclicked on an empty spot in Windows explorer and selected "New Excel
worksheet", I got a file that was about 12k (11,776 in xl2002).

I created two dummy workbooks. Both were exactly 11,776 bytes. I added
comments via right click|properties and the file sizes didn't change.

I opened the files in my favorite text editor and I could see my comments in the
second file.

From that, I'm guessing that the structure of the excel file already has a
location reserved for comments within the file--whether it's actually filled
with useful comments or just waiting for them.

I'd be very careful playing with non-MS files. If you do a little
experimentation with the simplest file (*.txt), you'll see that you don't even
get those options on the rightclick|properties menu.

(I would guess that more non-MS files are like .txt than .xls (but that's just a
guess).)
 
I am using Windows 2000 and I think it is a property of
the operating system as opposed to being file-specific.
Explorer running under Windows 2000 allows these file
properties to be displayed and modified.

Kevin Beckham
 
In windows 98SE, using windows explorer, there are no properties for
non-Office app files.
 
In win98 SE which I recall you are using, that is correct, but in Windows
2000, in Windows Explorer, you can assign some properties. I suspect this
requires NTFS file system and these are probably stored as part of the
directory structure.
 
Back
Top