|
-
Mar 20th, 2000, 06:41 AM
#1
Thread Starter
Hyperactive Member
*** READING FILE PROPERTIES ***
Has anyone been able to programmatically retrieve the "Properties" of a file?
I am not talking about the usual properties but instead those properties you get when right-clicking on a file in Windows Explorer.
When you right-click on a Word Document you get both the Builtin and Custom properties for that doucment and you can modify them.
I really want to be able to get at these properties without having to actually open up Word, load it and modify them.
If anyone has ANY help whatsoever PLEASE, please, please put your 2c worth in. Even if its just to point the finger in some direction I would appreciate it... an API even ;-)
-
Mar 20th, 2000, 07:55 AM
#2
Thread Starter
Hyperactive Member
*** READING FILE PROPERTIES ***
Aren't I even going to have people take a look??!?!
Its very disheartening when you help out so many people on here and you get next to no one reply in return
-
Mar 20th, 2000, 08:31 PM
#3
Fanatic Member
Can't have you being unhappy! Smile 
Have a look at this demo project:
http://www.vb-world.net/demos/fileinfo/
It should tell you all you need to know.
John
Added:
Ooops - should have read your post in more detail. If you are looking at word properties in particular, you can use the Word Type Libraries to access file properties I think. Have a look at the document object and its associated properties. You can access other Office document's properties in a similar way.
As for a general way to get the properties of custom property tabs - I don't think that it's possible.
The property tabs are a shell extension of some description I think, so to get at them requires some nasty API work - if it is at all possible in VB.
The only way that I would suggest that you could emulate it is by opening up that properties window, then using windows messages and window handles (hwnds) to get the information out of the text boxes on the property page and into you app.
Try expanding on some of those ideas. Your question is quite a lot harder than I originally thought - sorry if I got your hopes up.
John
[Edited by John on 03-21-2000 at 08:43 AM]
-
Mar 21st, 2000, 06:47 AM
#4
Thread Starter
Hyperactive Member
Thanks John,
I appreciate the help.
I am currently doing it using the Word object but a problem exists if people are currently using word when this runs because it actually loads word into memory to do its stuff which I dont want it to do.
Have found many examples on how to bring that property box up such as the one you gave me but you are right... I dont think it is possible to use it.
Was hoping (and did some intensive research) into API's to do with or around the Windows Explorer in the hope that it would be in there... but unfortunately none existed.
*sigh* I guess I am just going to have to find an alternative.
But thanks anyway
-
Mar 21st, 2000, 09:06 AM
#5
Fanatic Member
have you looked at filesystemobjects? just look at the help for 'FileSystemObject' or make a reference to MS scripting and open it in the object browser
-
Mar 21st, 2000, 09:08 AM
#6
Thread Starter
Hyperactive Member
FileSystemObject doesn't give me the properties I want. That only gives you last modified, file size, type etc..
I want to be able to retrieve the "Custom" tab information or the "Summary" tab information which that cannot do.
Thanks anyway
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|