You'd presumably also want to change the prompts.Learn two easy methods for removing highlights on your PDF files, resulting in clean, easy-to-read documents.
The only way to find that out would be to reject or accept the revision, test whether the highlighting is still there, then undo the reject or accept. And, although you can test whether the revision range is highlighted, Word can't tell you whether the revision was the highlighting or, say, a change to the font formatting that happens to span the same range.
#TEXT IS HIGHLIGHTED IN WORD CODE#
Then output the tracked highlights to that column, by modifying the code after:īut so too are formatting changes, for example. You posted two macros, the first of which concerns only comments, not tracked changes.įor the second macro, you would presumably need to add and format another column to the table it creates, in the sections after: "Finished creating document.", vbOKOnly, Title MsgBox n & " tracked changed have been extracted. 'Apply bold formatting and heading format to row 1 ONewDoc.Close savechanges:=wdDoNotSaveChanges MsgBox "No insertions or deletions were found.", vbOKOnly, Title
'If no insertions/deletions were found, show message and close oNewDoc Cells(6).Range.Text = Format(oRevision.Date, "mm-dd-yyyy") If oRevision.Type = wdRevisionInsert Then 'To keep track of replace, adjust oRange to start after i 'Find each Chr(2) in strText and replace by appropriate textįind:=Chr(2), Replace:="", _ 'In case of footnote/endnote references (appear as Chr(2)), 'Get info from each tracked change (insertion/deletion) from oDoc and insert in table Cells(4).Range.Text = "What has been inserted or deleted" Columns(6).PreferredWidth = 10 'Revision date Columns(4).PreferredWidth = 55 'Inserted/deleted text Columns(3).PreferredWidth = 10 'Type of change OCol.PreferredWidthType = wdPreferredWidthPercent "Tracked changes extracted from: " & oDoc.FullName & vbCr & _ 'Insert a 6-column table for the tracked changes and metadata 'Create a new document for the tracked changes, base on Normal.dot "All other types of changes will be skipped.", _ "NOTE: Only insertions and deletions will be included. If MsgBox("Do you want to extract tracked changes to a new document?" & vbCr & vbCr & _ MsgBox "The active document contains no tracked changes.", vbOKOnly, Title Title = "Extract Tracked Changes to New Document" Finished creating comments document.", vbOKOnly, Title Cells(5).Range.Text = Format(oDoc.Comments(n).Date, "dd-MMM-yyyy") Cells(4).Range.Text = oDoc.Comments(n).Author Cells(3).Range.Text = oDoc.Comments(n).Range.Text Cells(2).Range.Text = oDoc.Comments(n).Scope ODoc.Comments(n).Scope.Information(wdActiveEndPageNumber) 'Get info from each comment from oDoc and insert in table Cells(3).Range.Text = "Code/ Comment text" Cells(2).Range.Text = "Textual Data/Comment Scope" Columns.PreferredWidthType = wdPreferredWidthPercent PreferredWidthType = wdPreferredWidthPercent 'Adjust the Normal style and Header style "Creation date: " & Format(Date, "MMMM d, yyyy") "Created by: " & Application.UserName & vbCr & _ "Comments extracted from: " & oDoc.FullName & vbCr & _ ONewDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text = _ 'Insert info in header - change date format as you wish 'Insert a 5-column table for the comments 'Create a new document for the comments, base on Normal.dotm If MsgBox("Do you want to extract all comments to a new document?", _ MsgBox "The active document contains no comments.", vbOKOnly, Title Title = "Extract All Comments to New Document"