ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Accessing document properties of non-Microsoft product files (https://www.excelbanter.com/excel-programming/281319-accessing-document-properties-non-microsoft-product-files.html)

Kevin Beckham

Accessing document properties of non-Microsoft product files
 
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[_3_]

Accessing document properties of non-Microsoft product files
 
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


Kevin Beckham

Accessing document properties of non-Microsoft product files
 
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

-----Original 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

.


Tom Ogilvy

Accessing document properties of non-Microsoft product files
 
In windows 98SE, using windows explorer, there are no properties for
non-Office app files.

--
Regards,
Tom Ogilvy


Kevin Beckham wrote in message
...
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

-----Original 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

.




Tom Ogilvy

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




Dave Peterson[_3_]

Accessing document properties of non-Microsoft product files
 
Yep, still win98.

Thanks for the clarification.


Tom Ogilvy wrote:

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


--

Dave Peterson



All times are GMT +1. The time now is 12:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com