PDA

View Full Version : add comments to documents summary



tommy1234
08-16-2007, 08:59 AM
Hello
I want to add comments to file summary ( when workbook is open - every time the name of the workbook is different) which will include last time file was updated and the time the file was save on the server (i have button for that and i konw how to take this data).
I find difficulty when i close the workbook i get error that the file is open in read only property
i tried to do this :
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim com1 As Office.DocumentLibraryVersion
com1.Comments = "tommy" 'just to check if the sub is OK
End Sub

how can i solve this problem (i saw an exaple in this site but it didn't help me) ??
thanks

Bob Phillips
08-16-2007, 09:23 AM
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.BuiltinDocumentProperties("Comments").Value = "tommy"
End Sub