View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Accessing document properties of non-Microsoft product 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.

--
Regards,
Tom Ogilvy



Dave Peterson wrote in message
...
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).)

Kevin Beckham wrote:

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


--

Dave Peterson