-
Is there any way to access the properties of a file? I want to be able, through code, to edit the fields of 1 file or multiple files by adding a summary or name to the title fields of the files. Is this possible?
Any help would be greatly appreciated.
Mike
-
You mean Attributes?
Code:
If GetAttr("c:\Jop") = vbDirectory then MsgBox "c:\Jop is a Directory
FileTitle? Fields? hmmm
-
I know this is a reply to an OLD post, but as I have spent a couple of hours getting the answer for a project I was working on, I thought I would record the answer for someone else, just in case they did a Search....
Basically, the File Properties, or Summary Properties of an Office document (Word, Excel, PPT) are defined in something called "Structured Storage Format" (See Microsoft Q239653.
To access these properties, MS have written a DLL for use from VB. See Q224351 and the DSOfile.DLL. This can be added to the Project References, and then you can access and manipulate the file properties as you want.
Cheers, Chris