Last Saved By property

J

jmac60

Word 2003 SP2...
Is it possible to write a macro that saves the Last Saved By property to a
field in a document and then set the doc to read only?

Thanks
John
 
D

Doug Robbins - Word MVP

Insert a { DOCVARIABLE varSavedBy } field in the document where you want the
information to appear and then use the following macro:

With ActiveDocument
.Variables("varSavedBy").Value =
..BuiltInDocumentProperties(wdPropertyLastAuthor)
.Range.Fields.Update
.SaveAs FileName:="Filename", WritePassword:="yourpassword"
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

jmac60

Exactly what I needed...Thanks alot Doug

Doug Robbins - Word MVP said:
Insert a { DOCVARIABLE varSavedBy } field in the document where you want the
information to appear and then use the following macro:

With ActiveDocument
.Variables("varSavedBy").Value =
..BuiltInDocumentProperties(wdPropertyLastAuthor)
.Range.Fields.Update
.SaveAs FileName:="Filename", WritePassword:="yourpassword"
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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