Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing properties of many files 1

Status
Not open for further replies.

melginger

Programmer
Jul 27, 2001
54
0
0
CA
I have to enter several properties in about a 1000 files. What I mean by properties is that, I open each file and I do:
Fichier/propriétés that sould be in English: File/properties
and i put information in :
Titre (title)
Auteur (author)
categorie (category)
mot clé (key word)

My category is always the same and for each files in a folder, the author is the same...

So i would like to have my work half done by programming something putting info in the properties without me or without the fact that I have to open manually every file...

I look in the File System object Reference to find an answer but for now I have nothing.

Thanks
 
You should be able to do something like this



Dim fso As New FileSystemObject
Dim strFileName As String
Dim fsoFolder As Folder
Dim fsoFileColl
Dim fsoFile As File

Set fsoFolder = fso.GetFolder("G:\example")
Set fsoFileColl = fsoFolder.Files

For Each fsoFile In fsoFileColl
strFileName = fsoFile.Name
'open your file here and put your info in

Next

 
From the details of your query, it sounds like you want to modify the info in Office documents. Now, whilst you can automate this by actually working through the various Office applications that's a pain. What you want is to be able to directly access Office document properties from VB. And you can, thanks to a little known, little advertised DLL from Microsoft called DSOFile.dll (in fact this allows you to read an modify the Document Summary properties of any OLE Structured Storage document).

Details of this library, and a download link are available here (note that you'll need to copy and paste the whole line into your browser, since the semi-colons in the URL breaks tek-tips linking ability):

 
GENIAL strongm :) !!!!!!

Thanks many many many times!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top