Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2017 by Barry MacDonnell. All Rights Reserved.

Page updated May 17, 2016

WordPerfect Tips
Main tips page | Browse tips
Using "Document Compare"

Notes

WordPerfect menu choices refer to the <WordPerfect> menu (right-click on the top menu bar for a choice of menus). If you use a <Microsoft Word> menu, the choices might be absent from your menu (but not from the program), or they might be found under another menu selection. See here for more.


WordPerfect has several related features that help you collaborate with others on a document, or let you see how your document has changed in comparison to an earlier version of the document.

For those who need to collaborate on documents, Laura Acklen has written a chapter entitled "Collaborating on Documents" in her book, "Special Edition - Using WordPerfect Office X3." In it, she explains how to use Comments, the Highlight tool, and the document Review feature. If you need these features you should consider purchasing her book.

[The Home and Student edition does not include the Reveiew feature. See here for more on various WordPerfect versions and editions.]

The following information was gleaned from several sources and should help you use the File, Document, Compare, Compare Only feature.

You will note that some information (such as dialog settings) also applies to File, Document, Compare, Compare/Review. As implied above, Compare/Review is not covered here except as a related issue.

Document Compare (with File, Document, Compare)

There are two general reasons to use Document Compare.

1. Make collaboration easy: If you are working with others to create a document you can collaborate more easily by using Document Compare. It allows you to compare the current version of a document to an earlier version and display the changes that were made.

2. Trap errors: As Laura Acklen wrote in her book,

"Despite all the advantages electronic file transfers can bring, you might be reluctant to distribute your documents electronically because of the possibility of accidental (or intentional) changes being made to the text.

Only by comparing a reviewed [or revised] document to the original can you be sure that no unauthorized [or unwanted] changes were made. The Document Compare feature compares two copies of a document and inserts revision marks for you. Its text has been added, it's displayed in redline; if text has been deleted, is copied back into the document as strikeout text. [See Footnote 1 about the differences in redline and strikeout as they are used in the two types of document Compare.] If so much as a space has been changed, you'll know about it."

Typically, you open the reviewed or revised document first. Then you compare it to the original. Here's how.

Set your preferences

The first thing you should do is specify settings for comparing the two documents. This lets you choose to compare the documents' text word by word or character by character. For example, you can include certain document elements, such as headers and footers, in the document comparison. You can also generate a summary that includes the names of the original and modified documents. The summary also describes the attributes used to display deletions and insertions in the revised document.

[From WordPerfect 9 Help (which also applies to later versions):]

Changing the settings for document review and compare

You can change the settings you use for comparing and reviewing documents, and you can change the appearance of printed redline text.

To change the settings for comparing and reviewing documents

1. Open the document in which you want to change settings.
2. Click File, Document, Compare.
3. In the Compare Documents dialog box, click the Settings button, then choose Compare Only.
4. In the Document Compare Settings dialog box, click the Options tab.
5. In the "Marking precision" section, enable one of the following buttons:

  • Word - lets you mark a specific word (compares text word by word)
  • Character - lets you mark specific characters (compares text character by character)

6. In the "Characters to enclose text to skip in comparison" box, type the characters between which you want the comparison to skip.

  • For example, if you type { }, everything surrounded by { } will be skipped in the comparison.

7. In the "Summary Of comparison" section, enable one of the following buttons:

  • None - no comparison summary is created
  • Insert at beginning - inserts a comparison summary at the beginning of the document
  • Insert at end - inserts a comparison summary at the end of the document

8. In the "List of changes" section, enable one of the following buttons:

  • None - shows no changes (i.e., no list of changes is created)
  • Show surrounding context - shows the changes in the context of the document (i.e., displays the change along with some of the text that appears before and after the change in the document; this helps you locate changes in the document.)
  • Show change only - shows only the changes made

9. In the "Include in comparison" section, enable one or more of the following check boxes:

  • Headers/Footers - compares information in headers and footers (i.e., includes headers and footers in the document comparison)
  • Comments - compares information in comments
  • Expand Master Documents - compares information in expanded master document

10. The other tabs (Insertions, Deletions, Moves) should be self-explanatory. They will show examples of any changes you make.

To change the appearance of printed redline text, choose the Redline Method tab (or you can click File, Document, Redline Method later), then enable one of the following buttons:

  • Printer default format - uses the redline method specific to your printer (usually a shaded background) [See the Footnote 2]
  • Mark left margin - uses the redline character in the left margin of any lines containing redline text
  • Mark alternating margins - uses the redline character in the left margin for even-numbered pages and in the right margin for odd-numbered pages
  • Mark right margin - uses the redline character in the right margin

Selecting any of the last three "Mark..." items will activate the "Redline character" field, where you can enter the character you wish to use in the margins.

Compare the documents

To compare one document to another, you first need to open a document in WordPerfect and then choose the document with which you want to compare it. You also need to decide if you want to display the changes in a new, revised document or in the open document.

1. Open the reviewed or revised document.

2. Click File, Document, Compare....

3. In the "With" box, type the folder and filename of the file against which you want to compare the document. This is typically the original document or the penultimate revision of it. (If you want to browse for this file, click the small browse button on the right side of this field.)

4. In the "Show markings in" area, enable one of the following options:

  • New document - displays comparison results in a new document
  • Current document - displays comparison results in the active document

5. Click Compare Only.

TIP: You can remove markings later with File, Document, Remove Markings.




Footnote 1

The displayed "redline" and "strikeout" items referred to here in relation to Compare/Review are not the same things produced by Format, Font, Redline/Strikeout -- which might have been applied by you or which are automatically applied with Compare Only.

The items produced by Compare/Review may visually appear the same as the standard redline/strikeout text attributes on your screen. However, they are generated by special internal codes ([Insertion] and [Deletion]) that differ significantly from the latter's text attribute format codes (i.e., [Redln] and [StkOut]).

[Tip: Some users on WordPerfect Universe wanted to convert standard [Redln] and [StkOut] text attribute codes to the special codes used by Document Compare/Review so they could share the document among active reviewers. Here is the thread and a couple of (beta) macros to do it [reproduced in Footnote 3 below].]


Footnote 2

[Related tip:] If printed redline text shows up as standard or slightly faded text, it may be because of the following problem. From Corel's Knowledge Base (for WordPerfect 10, but it may apply to other versions):

"The printer driver installed on your computer determines the display style of printed redline text. Each printer type can produce printed redline text differently. However, in most cases you can configure a print job to display redline text against a shaded gray background.

To display printed redline text -

1 Click File > Print.
2 Click the Advanced tab.
3 In the Advanced options area, disable the Print in color check box.
4 Click Print."

[This does not always work but it is worth trying.]


Footnote 3

[Related tip:] Here are two (beta) macros (mentioned in the footnote above) from a thread on WordPerfect Universe concerned with converting all standard redline and strikeout attributes in a document to the internal codes used by Compare/Review:

"... these macros have not been thoroughly tested. Use them on a copy of your document to verify that they work for you.

Note that if you have both redline and strikeout format codes in the same document, playing the first macro ("Changes Redlined text to Inserted text") before playing the second one ("Changes Strikeout text to Deleted text") seems to work better than the other way around -- but I am not certain, since I haven't conducted thorough testing."

To copy the code below into your WordPerfect program to create working macros, see http://wptoolbox.com/tips/CopyCode.html.

BE SURE to insert the actual codes where indicated in each macro: Remove the text placeholder (shown in bold) for the code and use the Codes button on the macro toolbar to insert the actual binary code between the double quote marks. [There are 3 items in the first macro and 2 in the second one.]

First macro

Operation: The macro will exit from any substructure (header, etc.), set Search parameters to defaults, turn Reviewer mode off (if on), then search for redline codes, select the text between them, cut (delete) that selected text to the clipboard, delete the leftover redline code pair, add a space (if there's a non-space text character on the left), switch to Reviewer mode, paste the deleted text back into the document (i.e., as a Reviewer insertion), switch out of Reviewer mode (i.e., turn it off temporarily), and repeat the cycle until no more items are found. It then will delete all redline code pairs created with the Format feature. (Whew!)

// Changes Redlined text to Inserted text

pExitSubstructures ()
pResetFindReplace ()
ReviewDocManualModeToggle (Off!)
OnNotFound(End@)
PosDocVeryTop()
Typeover(Off!)
Repeat
    SearchString("[Redln On]")  // <- Insert [Redln On] with Codes button
    MatchPositionAfter()
    SearchNext(Extended!)
    SearchString("[Redln Off]")  // <- Insert [Redln Off] with Codes button
    MatchExtendSelection()
    SearchNext(Regular!)
    EditCut
    DeleteCharPrevious
    If(CtoN(?LeftChar)>32 and CtoN(?LeftChar)<127)
        Type(" ")
    Endif
    ReviewDocManualModeToggle (Mode:Reviewer!)
    EditPaste
    ReviewDocManualModeToggle (Off!)
Until(?NotFound)
Label(End@)
pResetFindReplace ()
// Remove all redline code pairs -
PosDocVeryTop
MatchSelection()
SearchString("[Redln On]")  // <- Insert [Redln On] code with Codes button
ReplaceAll(Extended!)

// OPTIONAL: Turn Reviewer mode on in the document -
ReviewDocManualModeToggle (Mode:Reviewer!)

Quit

Procedure pResetFindReplace ()
SearchString ("")
ReplaceString ("")
// Only one of these 4 Match commands
// can be active at any one time:
// MatchPositionAfter ()
// MatchExtendSelection()
// MatchPositionBefore()
MatchSelection()
SearchFindWholeWordsOnly (No!)
MatchWithAttributes (No!)
ReplaceWithAttributes (No!)
SearchCaseSensitive (No!)
ReplaceWithCase (No!)
MatchWithFont (No!)
ReplaceWithFont (No!)
MatchWithFontSize (No!)
ReplaceWithFontSize (No!)
SearchInSelection (No!)
SearchWordForms (No!)
SearchWrap (No!)
MatchLimit (No!)
EndProcedure

Procedure pExitSubstructures ()
While(?Substructure)
    vSubDoc:=?CurrentSubDoc
    SubstructureExit
    If(vSubDoc=10 or vSubDoc=11) BoxEnd(Save!) EndIf
EndWhile
vBoxType:=?BoxContentType
// If the cursor is in an image or a text box is selected, exit from it:
If(vBoxType=1 or vBoxType=3) BoxEnd(Save!) Endif
EndProc

Second macro

Operation: Similar to first macro.

// Changes Strikeout text to Deleted text

pExitSubstructures ()
pResetFindReplace ()
ReviewDocManualModeToggle (Off!)
OnNotFound(End@)
PosDocVeryTop()
Typeover(Off!)
Repeat
    SearchString("[StkOut On]")  // <- Insert [StkOut On] with Codes button
    MatchPositionBefore()
    SearchNext(Extended!)
    SearchString("[StkOut Off]")  // <- Insert [StkOut Off] with Codes button
    MatchExtendSelection()
    SearchNext(Regular!)
    ReviewDocManualModeToggle (Mode:Reviewer!)
    EditCut
    ReviewDocManualModeToggle (Off!)
Until(?NotFound)
Label(End@)
pResetFindReplace ()

// OPTIONAL: Turn Reviewer mode on in the document -
ReviewDocManualModeToggle (Mode:Reviewer!)

Quit

Procedure pResetFindReplace ()
SearchString ("")
ReplaceString ("")
// Only one of these 4 Match commands
// can be active at any one time:
// MatchPositionAfter ()
// MatchExtendSelection()
// MatchPositionBefore()
MatchSelection()
SearchFindWholeWordsOnly (No!)
MatchWithAttributes (No!)
ReplaceWithAttributes (No!)
SearchCaseSensitive (No!)
ReplaceWithCase (No!)
MatchWithFont (No!)
ReplaceWithFont (No!)
MatchWithFontSize (No!)
ReplaceWithFontSize (No!)
SearchInSelection (No!)
SearchWordForms (No!)
SearchWrap (No!)
MatchLimit (No!)
EndProcedure

Procedure pExitSubstructures ()
While(?Substructure)
    vSubDoc:=?CurrentSubDoc
    SubstructureExit
    If(vSubDoc=10 or vSubDoc=11) BoxEnd(Save!) EndIf
EndWhile
vBoxType:=?BoxContentType
// If the cursor is in an image or a text box is selected, exit from it:
If(vBoxType=1 or vBoxType=3) BoxEnd(Save!) Endif
EndProc