>I want to know which user last saved a word document. With VBA (Word 2002) this works:
>
gcLastSavedBy = ActiveDocument.BuiltInDocumentProperties(wdPropertyLastAuthor)
. I'm unable to figure out the VFP 6 equivalant? Here's one example of what I've tried with VFP :
>
>
# define wdPropertyLastAuthor
>oWord = createobject("Word.Application")
>gcLastSavedBy = oWord.ActiveDocument.BuiltInDocumentProperties(wdPropertyLastAuthor)
>
. There's no errors, but the variable is returned as an object.
>
>TIA
After reading the Help file several times, it does mention that BuiltInDocumentProperties returns an object. What looks confusing is that the second example doesn't mention the .Value property of the object (and it works just fine in VBA...perhaps Value is the default property). The first example shows the use of the Name and Value properties; but I skipped that example initially and went for the more straightforward-looking second example. So, all you need to do is amend the third line to:
gcLastSavedBy = ;
oWord.ActiveDocument.BuiltInDocumentProperties(wdPropertyLastAuthor).Value
Another note...that first line should read:
#DEFINE wdPropertyLastAuthor 7
HTH,
- della