Programmatically find "document last saved by" in C#

K

KSeeSharp

Hello,
Is there a way to find "document last saved by" user info for a Word
2007 document using Word Interop in C#? I am looking for something
like "Globals.ThisAddIn.Application.ActiveDocument" <dot> lastsavedby
or something.
Thanks in advance,
Kaushik
 
J

Jonathan West

KSeeSharp said:
Hello,
Is there a way to find "document last saved by" user info for a Word
2007 document using Word Interop in C#? I am looking for something
like "Globals.ThisAddIn.Application.ActiveDocument" <dot> lastsavedby
or something.
Thanks in advance,
Kaushik

ThisAddIn.Application.ActiveDocument.Activedocument.BuiltInDocumentProperties("Last
Author")
 
K

KSeeSharp

ThisAddIn.Application.ActiveDocument.Activedocument.BuiltInDocumentProperti­es("Last
Author")

Thanks for the response but that did not seem to work. Compile error
saying BuiltInDocumentProperti­es is not a method. Any ideas?
 
K

KSeeSharp

Thanks for the response but that did not seem to work. Compile error
saying BuiltInDocumentProperti­es is not a method. Any ideas?- Hide quoted text -

- Show quoted text -

Got it! It needed to be:

((Office.DocumentProperties)revisedDocument.BuiltInDocumentProperties)
[Word.WdBuiltInProperty.wdPropertyLastAuthor].Value.ToString()

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top