Not utilizing power platform, but here's a VBA script you can just load into the word document and it generates an Excel file with all comments. Auto-generated table populates the following attributes of each comment:
Sub ExportCommentsToExcel()
Dim xlApp As Object, xlWB As Object
Dim i As Integer
Dim sectionNum As String
Dim sectionTitle As String
Dim referencedText As String
Dim isReply As String ' Store as string (TRUE/FALSE)
Dim cmtRange As Range
Dim para As Paragraph
' Initialize Excel
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Add
With xlWB.Worksheets(1)
' Set header values
.Cells(1, 1).Value = "Page Number"
.Cells(1, 2).Value = "Section Number"
.Cells(1, 3).Value = "Section Title"
.Cells(1, 4).Value = "Author's Name"
.Cells(1, 5).Value = "Comment"
.Cells(1, 6).Value = "Referenced Text"
.Cells(1, 7).Value = "Is Reply"
.Cells(1, 8).Value = "Date"
' Format headers
With .Range("A1:H1")
.Font.Bold = True
.HorizontalAlignment = xlCenter
.Interior.Color = RGB(191, 191, 191) ' Grey color
.Borders.Weight = xlThin
.Borders.LineStyle = xlContinuous
End With
' Populate the data
For i = 1 To ActiveDocument.Comments.Count
Set cmtRange = ActiveDocument.Comments(i).Scope
' Initialize variables
sectionNum = "N/A"
sectionTitle = "N/A"
' Fix for Referenced Text
If Len(Trim(cmtRange.Text)) > 1 Then
referencedText = Trim(cmtRange.Text)
Else
referencedText = "N/A" ' Handles cases where referenced text is just "/" or blank
End If
' Correctly determine if the comment is a reply
If ActiveDocument.Comments(i).Parent Is Nothing Then
isReply = "FALSE" ' Standalone comment
Else
isReply = "TRUE" ' This comment is a reply
End If
' Find the closest preceding heading
For Each para In ActiveDocument.Paragraphs
If para.Range.Start <= cmtRange.Start And para.Style Like "Heading*" Then
' Get heading title
sectionTitle = Trim(para.Range.Text)
' Get heading number (if formatted as a numbered list)
On Error Resume Next
sectionNum = Trim(para.Range.ListFormat.ListString) ' Extracts the number like "1.2.3"
On Error GoTo 0
End If
Next para
' Populate Excel rows
.Cells(i + 1, 1).Value = cmtRange.Information(wdActiveEndPageNumber)
.Cells(i + 1, 2).Value = sectionNum ' Store only section number
.Cells(i + 1, 3).Value = sectionTitle ' Store only section title
.Cells(i + 1, 4).Value = ActiveDocument.Comments(i).Author
.Cells(i + 1, 5).Value = ActiveDocument.Comments(i).Range.Text
.Cells(i + 1, 6).Value = referencedText ' Now handles cases where text is blank or just "/"
.Cells(i + 1, 7).Value = isReply ' Correct TRUE/FALSE reply detection
.Cells(i + 1, 8).Value = Format(ActiveDocument.Comments(i).Date, "mm/dd/yyyy")
Next i
' AutoFit columns
.Columns("A:H").AutoFit
End With
' Cleanup
Set xlWB = Nothing
Set xlApp = Nothing
End Sub