In depth
Document Cleanup provides a set of technical operations that help you standardize and prepare a document without altering its written content. It focuses on structural corrections, metadata adjustments, and automated fixes that reduce manual maintenance work. The feature ensures your document is technically consistent and ready for further processing, sharing, or review.
Possibilities
Below is an overview of all operations you can perform with Document Cleanup, each explained briefly.
Replace headers – Replaces all existing headers in the document with a specified header.
Replace footers – Replaces all footers throughout the document in a single action.
Replace placeholders – Finds predefined placeholders and replaces them with supplied text or values.
Remove consecutive spaces – Detects and removes multiple spaces in a row to ensure consistent spacing.
Remove empty paragraphs – Deletes unnecessary blank paragraphs that create unwanted gaps.
Remove manually inserted paragraph numbers – Removes typed-in numbering so only automatic numbering remains.
Remove metadata – Clears metadata such as document properties or personal information.
Accept all Track Changes – Applies all proposed changes and converts them into regular content.
Reject all Track Changes – Discards all proposed changes and restores the original text.
Swap Track Changes author – Replaces the recorded author name for existing tracked changes.
Append a document – Adds another document’s content to the end of the current file.
Prepend a document – Adds another document’s content to the beginning of the current file.
Add protection to the DOCX file – Applies document protection to restrict editing.
User interface
All the options of the Document Cleanup feature are visible in a single overview.
There are only two steps you need to take:
Select operation(s)
Execute!

Step 1: Selecting operation(s)
Before you can execute, you must select one or more operations that you wish to use.
This means you can apply more than one operation at a time, for example, removing consecutive spaces and empty paragraphs in one go.

Please note that not all operations can be combined. You will notice this when you are unable to execute:

For some of the operations, you will see that you have additional configuration options.
For example, for the operation ‘Remove consecutive spaces’, you can choose to make the changes identifiable using Track changes.
We will examine what is possible with each operation in more detail below.
Step 2: Execution
The second and final step is execution.
There are two options here:
Replace opened document
New Docx/New PDF
Replace opened document: this will immediately perform the selected operation on the active document on the left. You will see the changes happen immediately.
New Docx/New PDF: this allows you to generate a new Docx or PDF file on which the selected operations have been performed. Your active document will therefore remain unchanged.
Please note: not every operation offers both options! For example: with Append document, you will not have the option to do this immediately in the active document.
(Optional) Step 3: Save current set
An optional step is to save a set of operations so that you can recall them later.
This means you don't have to set each operation individually every time, but can simply recall a saved set.
To do this, first select your operations and save them:

You can then recall them at any time in the future and apply them immediately:

A saved set can be deleted whenever you wish by clicking on the three dots:

Operations
Below is a detailed overview of each operation:
Find & Replace
Replace footer
Here you have the option to edit your footers with the following possibilities:
Replace footers with the text you prepare in the operation.
Replace footers, but only if specific text is present.
Add new footers to sections that do not yet have them.
Copy footers from another document.
Remove footers.

Replace header
Here you have the option to edit your headers with the following possibilities:
Replace headers with the text you prepare in the operation.
Replace headers, but only if specific text is present.
Add new headers to sections that do not yet have them.
Copy headers from another document.
Remove headers.

Replace placeholders
This will give you an overview of all placeholders in the document.
You then have the following options for each placeholder: Replace (with text) Delete Don't change

Clean-up
Remove consecutive spaces
This operation automatically removes consecutive spaces.
You would be surprised how many double (or triple, or quadruple...) spaces sneak into an MS Word document over time. These unnecessary spaces not only cause ugly small "holes" to appear in the layout, but can also interfere in subtle ways with MS Word's layout engine.
ClauseBuddy automatically removes all those spaces in one go.
Remove empty paragraphs
This operation automatically removes empty paragraphs.
For example, in the example below (with the hidden symbols activated) you can see that there's an empty paragraph in between the two clauses. When this operation is executed, ClauseBuddy will automatically remove those empty paragraphs.

Use cases
As explained in our MS Word tutorial, adding empty paragraphs (typically by pressing Enter twice) goes against the philosophy of MS Word, and will cause all kinds of text flow issues. Instead, one should use the Space before and Space after options in a paragraph settings, ideally stored in MS Word styles.
When cleaning documents with bad layout, it often happens that those empty paragraphs remain throughout the document. This can be fixed with this operation.
Remove manually inserted paragraph numbers
This operation removes manually inserted ("hardcoded") numbers from the beginning of paragraphs.
For example, in the following screenshot, you can see that the 5.1 was manually typed in (when you would position your cursor on the number, it will not be shown with a light grey background).

When this operation is executed, ClauseBuddy will automatically remove such number, and any subsequent space:

Notes
This operation will only target numbers — bullets will remain unaffected.
This operation will not target numbers within headers, footers and footnotes.
Remove metadata
This operation primarily removes all the "metadata" from a DOCX file.
This operations is the equivalent of what you can manually each within MS Word by clicking several layers deep, so the main benefit of this operation is that it saves you some clicks (particularly if you create a predefined set of operations for your colleagues).
You can also enable the Remove personal information on save option. This causes MS Word to automatically remove any personal information from the DOCX-file upon each save.

Background explanation
"Metadata" consists of several types of information stored within a DOCX-file, such as the author, manager, company, template being used, storage location. In fact, you can even store any amount of custom data in a file.
Because metadata is hidden fairly deeply inside a DOCX-file, companies can inadvertently expose (semi)confidential information to outside parties. Unremoved metadata can also lead to embarrassing situations, e.g. when it is revealed that prestigious law firm X actually used a template from competitor Y...
To see the metadata in MS Word for Windows, you have to go to the File tab in the ribbon, subsection Info.

When you click on Advanced Properties in the top-right corner, you can see all information:

To remove the metadata manually, you have to click on the Inspect Document option in the Info panel of MS Word for Windows.

In the dialog box that appears, you must then click on Inspect at the bottom, and then finally click on Remove all.

The Remove personal information on save option can be found in a completely different location: under File > Options, Trust Center > Trust Center Settings, then Privacy Options:
Because all of this is buried very deeply, it's self-evident why most legal professional don't realise the metadata issue. Or why there exists a cottage-industry of dedicated software applications that remove this automatically (e.g., when you're sending out emails).
Track Changes
Accept all changes
This operation allows you to accept all "track changes" of the active document. The use case of this operation is typically in the context of finalising a document, e.g. when making it ready for signing.

Settings
When you check Delete all comments, all comments that were included (of every party) will get deleted. When this setting is not activated, any comments will be left untouched.
When you check Stop tracking changes, any changes made by a user when opening the resulting document, will not be marked as changes. In other words, this is similar to disabling the Track changes button in the Review tab of MS Word.
Reject all changes
This operation is similar to the Accept all changes operation, but rejects instead of accepts all changes.
Swap track changes author
This operation allows you to change all the authors, of all the "track changes", to a single author.
The typical use case is to resolve a situation where a single DOCX-file has gone through the hands of multiple legal professionals, who all have made changes (e.g., a junior lawyer, a senior lawyer and the partner all have added some comments), and you want to avoid that the customer/client/counterparty would notice this. Instead, you want the customer/client/counterparty to see a single name appear in the track changes (e.g., the name of the partner).

You can also choose to only modify the changes made by one author.
Another setting you can activate, is whether to also change the author of the comments. If so, then all the comments will appear to have been made by this same person (Tyrion in the screenshot above).
Subdocuments
Append & Prepend document
This operation allows you to append a PDF-file or DOCX-document at the end of the active document (append) or at the front (prepend).
Use cases
Your graphical designer has prepared a nicely-looking PDF-file that you can include as a cover-sheet for client pitching. As a legal professional you obviously prepare the content of the pitch in an MS Word-file (perhaps even automatically generated with Clause9 or ClauseBuddy's Smart Templates), but it's not possible to include a PDF-file as such as the first page of your document. If you are technically savvy, you may know how to convert the PDF-file to a bitmapped graphic (e.g., a PNG or JPG), and then include that graphic in the MS Word-file, but that would easily blow up the size of the Word-file to several megabytes. ClauseBuddy avoids all this hassle, by allowing you to concentrate on your Word-file and attaching the cover-PDF through an Operation.
When concluding contracts for a certain line of business (e.g., selling products), you may have one or more static technical annexes (DOCX or PDF) that must be attached at the end. ClauseBuddy can attach those documents for you, so you don't have to include them in the Word-file itself.
When concluding contracts, you may want to attach your terms & conditions. Through this operation, ClauseBuddy can do this automatically for you, which is often better than physically embedding those terms & conditions into your Word-file, because:
physically embedding them requires some skill, as the styling is often different than the rest of the document (e.g., requires a separate section in two columns, with a different font, etc.)
you often deliberately don't want to include the text of the terms & conditions, as this would "invite" your counterparty to start making changes.
Settings
The only setting you must configure is selecting the right document that you want append/prepend:

You can either select a PDF-file or a DOCX-file.
Protection
Add protection to DOCX-file
This operation allows you to add several kinds of protection to your active file.

This operation is the equivalent of manually adding these protections in MS Word. Given that most legal professionals are unaware of even their existence, the use case is therefore also to make things easier for ClauseBuddy-users.
Available protection-types
Add watermark allows you to add a watermark (i.e., big grey text) to the background of each page, and to avoid that recipients of your file can change the document without the password.
Allow only comments disallows any changes, other than comments. Bear in mind that you will probably annoy other legal professionals when this protection is active, as the Word-file then becomes reasonably similar to an uneditable PDF-file.
Allow only revisions automatically enables track changes, so that any change made by another user will automatically be visible when you get back the document. This setting avoids that users can sneakily insert changes into a document, i.e. without those changes showing up.
Read-only disallows any type of change.
Allow only forms only allows other users to fill in any forms that exist in the document (i.e., dropdown boxes, edit boxes, etc. For a quick overview, see for example https://edu.gcfglobal.org/en/word-tips/how-to-create-forms-in-word/1/
Last updated