Sub PropertiesProject()
Dim Username: Dim Time, CurrentComments As String
Time = Format(Now(), "Short Date")
Username = Environ("USERNAME")
CurrentComments = ActiveDocument.BuiltInDocumentProperties("comments").Value
If CurrentComments = "" Then
ActiveDocument.BuiltInDocumentProperties("comments") = Time & " Created By " & Username & ";"
Else
ActiveDocument.BuiltInDocumentProperties("comments") = CurrentComments & " " & Time & " Updated By " & Username & ";"
End If
End Sub
Sub PropertiesProject()
Dim Username: Dim Time, CurrentComments As String
Time = Format(Now(), "Short Date")
Username = Environ("USERNAME")
CurrentComments = ActiveDocument.BuiltInDocumentProperties("comments").Value
If CurrentComments = "" Then
ActiveDocument.BuiltInDocumentProperties("comments") = Time & " Created By " & Username & ";"
Else
If (Last Digit) <> ";" Then
ActiveDocument.BuiltInDocumentProperties("comments") = CurrentComments & "; " & Time & " Created By " & Username & ";"
Else
ActiveDocument.BuiltInDocumentProperties("comments") = CurrentComments & " " & Time & " Updated By " & Username & ";"
End If: End If
End Sub
Sub PropertiesProject()
Dim Username: Dim Time, CurrentComments, LastChar As String
CurrentComments = ActiveWorkbook.BuiltinDocumentProperties("comments").Value
LastChar = Right(CurrentComments, 1)
Time = Format(Now(), "Short Date")
Username = Environ("USERNAME")
If CurrentComments = "" Then
ActiveWorkbook.BuiltinDocumentProperties("comments") = Time & " Created By " & Username & ";"
Else
If LastChar <> ";" Then
ActiveWorkbook.BuiltinDocumentProperties("comments") = CurrentComments & "; " & Time & " Updated By " & Username & ";"
Else
ActiveWorkbook.BuiltinDocumentProperties("comments") = CurrentComments & " " & Time & " Updated By " & Username & ";"
End If: End If
End Sub