Is there any way to print a list of only tracked changes (without the rest of the document) in Writer?

In Microsoft Word, it is possible to a list of just the tracked changes; see the first point of this blog post. Is there a way to do this in LibreOffice? From searching the answer appears to be “no” but wanted to do a hive mind check that I’m not missing something. I can see that I can print comments only, from the print dialog, but nowhere to get just changes.

did you mean to post this as a reply to my question? it seems like it is a separate question

You want a feature that currently isn’t available in LibreOffice; the link tells you how to make a request to have it added.

My question was “Does this functionality currently exist somewhere in the application?” not “How do I file a feature request?”, in an attempt to not file FR’s for things that already exist. But I’ll take I guess both of these answers as implied “No this functionality does not exist” answers.

I think that is as close to No, it doesn’t exist as makes no difference.

This could be a rewarding task for a macro coder.

1 Like

Starting version (0.2) of the macro.
Activate the document containing Track Changes and execute the ShowTrackChanges2 macro (without parameter).

' Shows Track Changes in a separate Calc document.
Sub ShowTrackChanges2(Optional ByVal oDoc As Object)
  Dim dataArray(), ind As Long, n as Long, oRedlines As Object, oViewCursor As Object
  Dim oCalcDoc As Object, oRange As Object, oColumns as Object, nf As Long, page, s As String
  Dim oLocale As New com.sun.star.lang.Locale
  If IsMissing(oDoc) Then oDoc=ThisComponent
  oRedlines=oDoc.RedLines
  If oRedLines.Count=0 Then 
    Msgbox "No Track Changes"
    Exit Sub
  End If   
 
  oViewCursor=ThisComponent.CurrentController.getViewCursor()
  n=oRedlines.Count
  ReDim dataArray(n)   
  dataArray(0)=Array("DateTime", "Author", "Description",  "Page", "Text", "Comment") 
  For ind=0 To n-1
    With oRedLines(ind)
      s=""
      page="" 
      If (Not (.RedlineStart Is Nothing)) And (Not (.RedlineEnd Is Nothing)) Then
        oViewCursor.gotoRange .RedlineStart, False
        oViewCursor.gotoRange .RedlineEnd,   True
        page=oViewCursor.page
        s=oViewCursor.String
      End If
    
      dataArray(ind+1)=Array(Cdbl(CDateFromUnoDateTime(.RedlineDateTime)), .RedlineAuthor, _
                            .RedlineDescription, page, s, .RedlineComment)
      
    End With
  Next ind   
   
  ' Show DataArray
  oCalcDoc = StarDesktop.LoadComponentFromUrl("private:factory/scalc","_default",0, Array())
  oRange=oCalcDoc.Sheets(0).getCellRangeByPosition(0, 0, Ubound(DataArray(0)), Ubound(DataArray))
  oRange.setDataArray dataArray
  
  ' Title style
  oRange.getCellRangeByPosition(0, 0, oRange.Columns.Count-1, 0).CellStyle="Accent"
   
  ' NumberFormat
  nf=oCalcDoc.NumberFormats.queryKey("YYYY-MM-DD HH:MM:SS", oLocale, false) 
  oRange.getCellRangeByPosition(0, 1, 0, oRange.Rows.Count-1).NumberFormat=nf
  
  oColumns=oRange.Spreadsheet.Columns
    
  ' AutoFilter
  oCalcDoc.DatabaseRanges.addNewByName("db_1", oRange.RangeAddress)
  oCalcDoc.DatabaseRanges.getByName("db_1").autoFilter=True
  
  ' OptimalWidth
  For ind = 0 To 3
      oColumns.getByIndex(ind).OptimalWidth=True
  Next ind
 
 oColumns(4).Width=10000
 oColumns(5).Width=5000
 oRange.getCellRangeByPosition(4, 1, 5, oRange.Rows.Count-1).IsTextWrapped=True
End Sub
3 Likes

:+1:
DemoTrackChangesMacro.odt (62.8 KB)

This is now bug 160497 160497 – FR: Print (or export) only tracked changes