Word VBA to get comment property without opening file

I think this may need API code but hoping there's a way to do it also using Word VBA.  I am writing a Word macro that needs to go through dozens of directories and find the name of any document that has the word 'Letter' in the Comments attribute.  When I find one, I will be adding that filename to a listbox so the user can see it.

I don't want to open the word document first and then look for the text in the Comment attribute as that would be too slow.  I would ike to use VBA/API code to read the contents of the Comments field as listed in Windows Explorer.

Any ideas on how to read the Comments attribute?  

Thanks so much.
hj_daisyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:
Microsoft have produced a downloadable utility for that:

http://support.microsoft.com/kb/224351

There are some examples, but in case you don't have a stand-alone version of VB, here is some starter code.

You need to set a reference to the DSO OLE Document Properties Reader (or switch to late binding)
Dim oFilePropReader As New DSOleFile.PropertyReader
Dim oDocProp As DSOleFile.DocumentProperties
Dim sFile As String
sFile = "C:\MyFolder\MyDocument.doc"
Set oDocProp = oFilePropReader.GetDocumentProperties(sFile)
MsgBox oDocProp.Author
Set oDocProp = Nothing
Set oFilePropReader = Nothing

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hj_daisyAuthor Commented:
Hmmm... very interesting.  Thank you.
Let me try this out during the week when I am at my client's office and I'll let you know if it works.  Looks promising!
LeeTutorretiredCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.