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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retreive author information from Office files

Status
Not open for further replies.

teolica

Programmer
Mar 13, 2006
4
CA
I'm trying to retreive the file AUTHOR from a Microsoft Office file (>doc, .Xls, ...).
They are visible in My Computer Author column for these type of Files.
Can anyone help me? I'm using VFP 9

Thanks
 
I think you'll find that this will do the job:

Code:
loWord = CREATEOBJECT("word.application")
loDoc = loWord.Documents.Open("MyDoc.doc")
? loDoc.BuiltInDocumentProperties(3).value

The "3" in the last line means document author. Other numbers will give you the values of other properties.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Sorry Mike,
I wanted to reply, but I didn't know how to do it.
Yes, it worked.

Thanks a lot,
Teolica
 
Teolica,

Glad it worked. As I'm sure you appreciate, it's considered good practice to reply to any answers you receive here, if only for the benefit of others who might have the same problem. It's good that you managed to work out how reply.

Now that you've figured out how to use the forum, do come back when you have more questions.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top