0

Trying to extract commentThreaded Resolved date in excel, but only see a way of counting resolved threaded comments. Is there a property for this? (I've checked Microsoft with only the date created)

A potential workaround could have been to export all replies IF that included the "Completed Task" date, but in my VBA export for all replies, none of the "Completed Task" records were exported.

3

2 Answers 2

0

If I understand what you want, from the documentation, it would seem as if you can

  • check if the Resolved property = True
  • if so, then the Resolved date will be the timestamp of the last reply.

So something like:

Option Explicit
Sub Comments()
    Dim myComment As CommentThreaded
    Dim firstDate As Date, ResolvedDate As Variant
    
Set myComment = Range("A1").CommentThreaded

firstDate = myComment.Date

If myComment.Resolved Then
    ResolvedDate = myComment.Replies(myComment.Replies.Count).Date
Else
    ResolvedDate = "not yet resolved"
End If

MsgBox "Comment created at " & firstDate & vbLf & "Resolved at: " & ResolvedDate

End Sub

might give you what you want.

But please note, this is only returning the timestamp of the last comment made. If the assumption that the last person to comment did not also resolve it is incorrect, then there is no way that I can see of knowing the time of resolution (or even who did it).

Note that Replies are sorted by timestamp.
I don't know what you mean by "Completed Task" date. I do not see a "Completed Task" property for threaded comments in Excel VBA

1
  • @TimWilliams You are correct, of course. Someone could mark the comment as resolved a day or three later, without adding a comment. I'll add a caveat to my answer. Commented yesterday
0

Ron already answered, but to double-check on what's really available or not it's sometimes useful to dig into the XML files in an unzipped copy of a workbook and see what's stored there...

Example below is from a test workbook with one threaded comment in A1, with 3 replies. I waited a few minutes after the last reply before resolving the comment. The original comment and each reply have their own timestamps, but there's no separate timestamp for the "resolved" status (done="1")

XML screenshot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.