VBA & Macro Problems

Fix WPS Writer VBA Find and Replace Track Changes Issues

John WilsonJohn Wilson Nov 13, 2026 868 views

Question details

A WPS Writer VBA macro that corrects spacing and punctuation can behave unpredictably when Track Changes is enabled, causing extra spaces or duplicate punctuation.

Fix WPS Writer VBA Find and Replace Track Changes Issues
Product
WPS Office Writer
Device & OS
not provided
Scenario
The user runs a Word VBA macro that corrects spacing and punctuation while Track Changes is enabled, and repeats the wildcard replacements.
Observed behavior
In No Markup or All Markup views, the macro may not find the intended text or may create extra spaces and duplicate punctuation when run more than once.
Before you start

Check whether Track Changes is enabled and which markup view is active in WPS Writer. If the document contains tracked revisions, accept or reject them before running the macro when possible.

Solution 1Recommended

Accept or reject tracked revisions before running the macro

Use this first when Track Changes markup keeps Find and Replace from seeing the intended text.

Word Find and Replace is designed for final text, not for text that is split across inserted and deleted revisions. Clearing the markup gives the macro a clean text layer.

1
Open the Review tab

In WPS Writer, open the document and click the Review tab on the ribbon.

2
Display tracked changes

Click Track Changes and select All Markup so you can see the revisions.

3
Accept or reject revisions

Click Accept, then choose Accept All Changes in Document. If you need to reject changes, use Reject and choose Reject All Changes in Document.

4
Run the VBA macro once

After the text is clean, press Alt+F11 to open the VBA editor or run your existing macro, then check spacing and punctuation.

Accept or reject tracked revisions before running the macro
Clean text produces stable replacements: With tracked revisions resolved, Find and Replace operates on final text only.

Fix WPS Writer VBA Find and Replace with Track Changes

Use WPS Writer's Review tab to resolve tracked revisions, simplify the VBA wildcard patterns, and run the macro once so Word-compatible documents keep clean spacing and punctuation.

  1. 1. Open the Word file in WPS Writer: Launch WPS Office Writer, click File, select Open, and choose the .docx or .doc document.
  2. 2. Resolve tracked revisions: Click the Review tab, then use Accept or Reject to accept or reject all changes before running the macro.
  3. 3. Open the VBA editor: Press Alt+F11 to open the Microsoft Visual Basic for Applications editor and locate the Find and Replace macro.
  4. 4. Simplify wildcard expressions: Edit the macro pattern to remove unnecessary vertical bars, use {1,} instead of @, and search repeated spaces with {2,}.
  5. 5. Run the macro once: Run the macro once and inspect the document in All Markup view for extra spaces or duplicate punctuation.
Works with Word .docx and .doc files while preserving formattingFamiliar Review tab for accepting or rejecting tracked changesVBA editor supports Find and Replace wildcard cleanupFree and lightweight Office suite with a Word-style interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does Word VBA Find and Replace fail when Track Changes is enabled?

Track Changes splits text into inserted and deleted revisions, so Find and Replace may not recognize the intended text in No Markup or Simple Markup view. In All Markup view, replacements can become separate revisions.

How do I accept all tracked changes in WPS Writer?

Open the Review tab, click Accept, and choose Accept All Changes in Document. After that, the macro operates on final text only.

Which wildcard changes help prevent extra spaces and duplicate punctuation?

Remove unnecessary vertical bars from the pattern, use {1,} instead of @, and search for repeated spaces with {2,} rather than using a broad wildcard.

Why should I avoid running the same Word Find and Replace macro twice?

Repeated wildcard replacements against tracked content can multiply edits and create extra spaces or duplicate punctuation. Run the macro once, inspect the result, and only rerun it after accepting revisions.

Can WPS Writer handle Word VBA macros and tracked changes?

WPS Writer provides a Review tab and VBA editor for working with Word-compatible documents. The same Find and Replace limitation with tracked revisions applies, so resolve revisions first.