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!

Word Document - Extended Properties

Status
Not open for further replies.

toetag

MIS
Sep 27, 2002
166
0
0
US
I've folders full of word documents. Thousands of them. Each file is randomly named (ij$lk2.doc for example) so they don't mean anything to anyone. My thought is to read the extended properties and rename the files based on the properties found.

I've been searching for awhile now and I can't find any real information on the subject other than "it's a shell extension".

Can anyone point me in the right direction. Even a little nudge would be helpful.

"The only desert to an Irishman is an empty glass".
 
Why don't you get the directory listing, open each file sequentially, and rename using the first few words of the document.

I believe this is the standard behaviour of MS Word anyways.

Unless your files are not actually .doc and you just used that as an example...
 
If you have hundreds/thousands of these files, doing this via Office Automation is likely to be fragile. If this is a one-time task, try batching them up into groups of 50 files or less. If this is a recurring task, investigate a library that can read .doc files without needing MS-Word installed on the computer -- it'll likely be much more reliable. SyncFusion sells one, and I'm sure there are others.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
I actually wound up finding something on "dsofile". started looking into that and discovered the DLL in the Microsoft example project.

I used that as a reference and was able to create a quick little console app that read the extended properties.

I hope and pray this is a one time only event. Thank you both for replying.

"The only desert to an Irishman is an empty glass".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top