Hi Karl,
Oops! Here's the corrected (and complete) code:
Code:
Private Sub Document_Close()
Dim StrOldTitle As String, StrNewTitle As String
Dim StrOldAuthor As String, StrNewAuthor As String
Dim StrOldSubject As String, StrNewSubject As String
Dim StrOldStatus As String, StrNewStatus As String
Dim bSaved As Boolean
With ActiveDocument
bSaved = .Saved
StrOldTitle = .BuiltInDocumentProperties("Title").Value
StrOldAuthor = .BuiltInDocumentProperties("Author").Value
StrOldSubject = .BuiltInDocumentProperties("Subject").Value
StrOldStatus = .BuiltInDocumentProperties("Content Status").Value
StrNewTitle = InputBox("Enter the Document Title:", "Title", StrOldTitle)
StrNewAuthor = InputBox("Enter the Document Author:", "Author", StrOldAuthor)
StrNewSubject = InputBox("Enter the Client and Site Name:", "Subject", StrOldSubject)
StrNewStatus = InputBox("Enter the Document Status:", "Status", StrOldStatus)
If StrOldTitle <> StrNewTitle Then _
.BuiltInDocumentProperties("Title").Value = StrNewTitle
If StrOldAuthor <> StrNewAuthor Then _
.BuiltInDocumentProperties("Author").Value = StrNewAuthor
If StrOldSubject <> StrNewSubject Then _
.BuiltInDocumentProperties("Subject").Value = StrNewSubject
If StrOldStatus <> StrNewStatus Then _
.BuiltInDocumentProperties("Content Status").Value = StrNewStatus
If bSaved = True And .Saved = True Then Exit Sub
End With
End Sub