Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Office Automation - last saved by
Message
 
 
To
12/09/2002 18:40:23
Ron Reimers
University of California-Berkeley
Berkeley, California, United States
General information
Forum:
Microsoft Office
Category:
Word
Miscellaneous
Thread ID:
00700000
Message ID:
00700031
Views:
24
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform