• Remove comment dates (Word XP)

    Author
    Topic
    #410841

    Is it possible to remove the dates in a comment? I want to keep the comment as a balloon, but I want to remove notice of when they were made.

    Viewing 2 reply threads
    Author
    Replies
    • #886645

      Hi,

      I have Word 200, not XP, and Word 2000 doesn’t have a ‘date’ attribute for comments – only an ‘author’ attribute. In Word 2000, ‘author’ is a property of the Comment object and can be changed, as in:
      If ActiveDocument.Comments.Count >= 1 Then
      With ActiveDocument.Comments(1)
      .Author = “Joe Smith”
      .Initial = “JAS”
      End With
      End If

      (from the Word help file)

      You may find that the date in XP can also be edited this way, though you may not be able to delete it.

      Cheers

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #886647

        Date is a property of the Comment object in Word 2002 (XP) VBA, but it is read-only, you cannot modify it.

      • #886648

        Date is a property of the Comment object in Word 2002 (XP) VBA, but it is read-only, you cannot modify it.

    • #886646

      Hi,

      I have Word 200, not XP, and Word 2000 doesn’t have a ‘date’ attribute for comments – only an ‘author’ attribute. In Word 2000, ‘author’ is a property of the Comment object and can be changed, as in:
      If ActiveDocument.Comments.Count >= 1 Then
      With ActiveDocument.Comments(1)
      .Author = “Joe Smith”
      .Initial = “JAS”
      End With
      End If

      (from the Word help file)

      You may find that the date in XP can also be edited this way, though you may not be able to delete it.

      Cheers

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    • #886650

      This Macro will delete all comments in the document and add them back. It preserves the Author, Initials, Text and Range – but sets the date/time to the time it runs.

      StuartR

      Sub CommentDatesToNow()

      Dim i As Integer
      Dim cmntNew As Comment
      Dim strAuthor As String
      Dim strInitial As String
      Dim strText As String
      Dim rngPosition As Range

      For i = ActiveDocument.Comments.Count To 1 Step -1
      With ActiveDocument.Comments(i)
      strAuthor = .Author
      strInitial = .Initial
      strText = .Range.Text
      Set rngPosition = .Reference.Duplicate
      .Delete
      End With
      Set cmntNew = ActiveDocument.Comments.Add(Range:=rngPosition, Text:=strText)
      cmntNew.Author = strAuthor
      cmntNew.Initial = strInitial
      Next i

      Set cmntNew = Nothing
      Set rngPosition = Nothing

      End Sub

      • #887159

        That code worked flawlessly and fast. I am not that familiar with the macro language, but I am guessing that this macro inserts a duplicate and then deletes the original, which leaves the comment with the present date. Given the other posts in the thread, it seems like the date in a comment cannot simply be deleted but only reset to the present. Is this correct?

        Thanks,

        cbran250

        • #887211

          Absolutely correct. The code stores the Author, Initials, Text and Document Range from the original comment, then deletes it and adds it back again. If you had fancy font formatting, embedded fields or other unusual things in comments they would get lost – but it works fine for standard comments.

          StuartR

        • #887212

          Absolutely correct. The code stores the Author, Initials, Text and Document Range from the original comment, then deletes it and adds it back again. If you had fancy font formatting, embedded fields or other unusual things in comments they would get lost – but it works fine for standard comments.

          StuartR

      • #887160

        That code worked flawlessly and fast. I am not that familiar with the macro language, but I am guessing that this macro inserts a duplicate and then deletes the original, which leaves the comment with the present date. Given the other posts in the thread, it seems like the date in a comment cannot simply be deleted but only reset to the present. Is this correct?

        Thanks,

        cbran250

    Viewing 2 reply threads
    Reply To: Remove comment dates (Word XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: