In this article, we plan on displaying 4 quick ways for you to view and accept revisions by date in your Word document.
A document can have multiple reviewers. Therefore, these revisions must be made in different date or time. Earlier, we’ve talked about how to view and accept revisions from a specific reviewer. Today, let’s show you how to view and accept revisions by date.
3 ways to View Revisions by Date
First, let’s take a look at the 3 ways to view revisions by date.
Method 1: Trigger the “Reviewing Pane”
- To start with, click “Review” tab.
- Then click the upside-down triangle button behind the “Reviewing Pane”.
- Next choose “Reviewing Pane Horizontal” on the drop-down list.
Now there shall be a window open at the bottom of the Word window. In the window are revisions and dates on which they are made.
Method 2: Extract Revisions Made on a Specific Date
- First of all, click “Developer” tab and then the “Visual basic” command to open the VBA editor. The alternative way is to press “Alt+ F11”.
- Then click “Normal” and then “Insert”.
- Next choose “Module” to insert a new one.
- Double click on the new module to activate the editing area.
- Then paste bellowing codes:
Sub ExtractRevisionsOfSpecificDate() Dim objRevision As Revision Dim objDoc As Document, objNewDoc As Document Dim dtRevisionDate As Date Dim strRevisionDate As String Dim varRevisionType As Variant Dim objTable As Table varRevisionType = Array("Replace", "Insert", _ "Property", "Delete", "ParagraphNumber", "NoRevision", "DisplayField", _ "Conflict", "Reconcile", "Style", "TableProperty", "SectionProperty", _ "ParagraphProperty", "StyleDefinition") strRevisionDate = InputBox("Input a revision date:") If strRevisionDate <> "" Then IsDate (strRevisionDate) Else End If dtRevisionDate = CDate(strRevisionDate) Set objDoc = ActiveDocument Set objNewDoc = Documents.Add Set objTable = objNewDoc.Tables.Add(Range:=objNewDoc.Range, _ numrows:=1, numcolumns:=3) nRow = 1 With objTable .Cell(1, 1).Range.Text = "Page" .Cell(1, 2).Range.Text = "Line" .Cell(1, 3).Range.Text = "Revision Type" For Each objRevision In objDoc.Revisions If CDate(Left(Format(objRevision.Date, "MM/dd/yyyy"), 10)) = dtRevisionDate Then .Rows.Add nRow = nRow + 1 .Cell(nRow, 1).Range.Text = objRevision.Range.Information( _ wdActiveEndAdjustedPageNumber) .Cell(nRow, 2).Range.Text = objRevision.Range.Information( _ wdFirstCharacterLineNumber) .Cell(nRow, 3).Range.Text = varRevisionType(objRevision.Type) End If Next objRevision End With End Sub
- Next, click “Run”.
- Now there is the dialog box. Enter the date on which all revisions you want to view are made. And click “OK”.
- Consequently, there will be a new document. On it is a table including all revisions of that day, such as below:
Method 3: Extract Revisions before a Date
In event you may like to export all revisions created before a date, here is the macro you can run.
- At first, repeat the first 4 steps in method 2.
- Then paste the following codes instead:
Sub ExtractRevisionsBeforeSpecificDate() Dim objRevision As Revision Dim objDoc As Document, objNewDoc As Document Dim dtRevisionDate As Date Dim strRevisionDate As String Dim varRevisionType As Variant Dim objTable As Table varRevisionType = Array("Replace", "Insert", _ "Property", "Delete", "ParagraphNumber", "NoRevision", "DisplayField", _ "Conflict", "Reconcile", "Style", "TableProperty", "SectionProperty", _ "ParagraphProperty", "StyleDefinition") strRevisionDate = InputBox("Input a date:") If strRevisionDate <> "" Then IsDate (strRevisionDate) Else End If dtRevisionDate = CDate(strRevisionDate) Set objDoc = ActiveDocument Set objNewDoc = Documents.Add Set objTable = objNewDoc.Tables.Add(Range:=objNewDoc.Range, _ numrows:=1, numcolumns:=3) nRow = 1 With objTable .Cell(1, 1).Range.Text = "Page" .Cell(1, 2).Range.Text = "Line" .Cell(1, 3).Range.Text = "Revision Type" For Each objRevision In objDoc.Revisions If CDate(Left(Format(objRevision.Date, "MM/dd/yyyy"), 10)) < dtRevisionDate Then .Rows.Add nRow = nRow + 1 .Cell(nRow, 1).Range.Text = objRevision.Range.Information( _ wdActiveEndAdjustedPageNumber) .Cell(nRow, 2).Range.Text = objRevision.Range.Information( _ wdFirstCharacterLineNumber) .Cell(nRow, 3).Range.Text = varRevisionType(objRevision.Type) End If Next objRevision End With End Sub
- Click “Run” button, too.
- Similarly, there is a dialog box popping up. Just input the date before which all revisions are needed to view. Then click “OK”.
Accept Revisions before a Specific Date
- Use the above steps to open VBA editor and run the following codes:
Sub AcceptRevisionsBeforeDate() Dim objRevision As Revision Dim dtTheDate As Date Dim strTheDate As String strTheDate = InputBox("Input the date before which all revisions should be accepted:") If strTheDate <> "" Then IsDate (strTheDate) Else End If dtTheDate = CDate(strTheDate) For Each objRevision In ActiveDocument.Revisions If objRevision.Date < dtTheDate Then objRevision.Accept End If Next objRevision End Sub
- In the dialog box open, type a date and click “OK”.
A Trick to Recover Word Files
Word is sensitive to corruption, hence leaving millions of files in danger. Word collapse can wipe out valuable and confidential data. Thus, you need a Word file problem recovery tool to free your trapped data.
Author Introduction:
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt xls data fix tool and pdf repair software products. For more information visit www.datanumen.com