# Redact in Word

> Find personal data in the Word document you have open and replace it with labels through your organisation's Redact: install, sign in, scan and what is sent.

Redact in Word finds personal data such as CPR numbers, names and addresses in the document you have open, and replaces the findings you choose with labels. It works through your organisation's Redact in komplai with your own access. You sign in with your komplai account; you do not need an API key.

## Before you start

- You are invited to komplai, and an administrator has given you access to Redact.
- Your organisation's agreement with komplai includes Redact's API and Word add-in. [Contact us](https://en.komplai.dk/#kontakt) if it does not.
- Your Word supports WordApi 1.6, DialogApi 1.1 and DialogOrigin 1.1. If it does not, the task pane says **Update Word to use this add-in**.
- Your organisation has tested the add-in in the Word you use. Word for Windows and Word on the web are tested separately.
- Your network allows `hub.komplai.dk`, `auth.komplai.dk` and `api.komplai.dk` over HTTPS.

## Install the add-in

If your IT department has deployed the add-in centrally, it is already in Word. It is called **[PROD] komplai for Word**, and its tab on the ribbon is **[PROD] komplai**. Otherwise:

**Word on the web**

1. Download the manifest file from [word.komplai.dk/manifest.xml](https://word.komplai.dk/manifest.xml).
2. Open a document in Word on the web.
3. Choose **Home** → **Add-ins** → **More Settings**, then **Upload My Add-in**, and choose the manifest file.

If uploading is blocked, ask your Microsoft 365 administrator to install the add-in.
**Word for Windows**

Your Microsoft 365 administrator installs the add-in from the Microsoft 365 admin center and assigns it to you. [Roll out Word in Microsoft 365](https://developers.komplai.dk/guides/word-rollout) has the steps, including a shared-folder catalog for testing on one PC.

## Sign in and connect Word

1. On the ribbon, open the **[PROD] komplai** tab and choose **Open Redact**. The task pane **komplai in Word** opens.
2. Choose **Sign in**. A window opens with komplai's sign-in. Sign in as you do in the hub.
3. On **Connect Word**, check that the organisation is the right one, tick **I authorize this Word connection under the displayed data policy.** and choose **Connect Word**.

The task pane then shows your organisation and a **Disconnect** button.

The connection is a personal API key with `access:read` and `redact:detect` that expires after 24 hours. It stays only in the task pane's memory, never in the document, the browser's storage or a URL. Closing Word removes it from your computer, and **Disconnect** revokes it at once. The connection is also listed under **API keys** in the hub at [hub.komplai.dk/api-access](https://hub.komplai.dk/api-access), where you can revoke it. If Word refuses to connect because you have too many keys, revoke the ones you no longer use there.

## Scan and replace

1. Under **Detection method**, choose **NER + Regex** to find names as well as patterns, or **Regex** for patterns only, such as CPR numbers. Word remembers your choice.
2. Choose **Scan document**.
3. Go through the findings, jump to each one in the document, and apply the replacements you choose.
4. Read the document through afterwards.

Accept or reject tracked changes before you scan: a document whose main text has tracked changes is refused. Redact switches change tracking off while it replaces text and then restores your setting, so the original text is not left behind as a tracked change. If you edit the document after a scan, scan it again.

## What is scanned and sent

- **What**: the main text of the document, at most 16,000 characters per scan. Headers, footers, footnotes, text boxes, comments, metadata and images are not scanned. Review them yourself before you share the document.
- **Where**: the text goes to komplai's API at Hetzner in Germany. Rules run on komplai's servers in Germany (EU). With **NER + Regex**, NER runs at the default place that [GET /v1/access](https://developers.komplai.dk/reference/account) marks, komplai's servers in Germany unless komplai has changed it. No language model runs on text from Word.
- **What is kept**: komplai keeps no copy of the text. Usage and access metadata are recorded. The findings and the original text of what you replaced stay in the task pane's memory until you close it.
- **Test data**: when the task pane says **Test data only**, your organisation's agreement covers test data only. Do not scan real personal data.

Each scan is a call to [POST /v1/redact/detect](https://developers.komplai.dk/reference/redact) with your connection's key, and it counts towards your personal and your organisation's request limits.

## When something does not work

| What you see | What to do |
| --- | --- |
| The button is missing | Quit Word completely and open it again; closing the document is not enough. On Windows with a shared-folder catalog, the catalog needs **Show in Menu** ticked. |
| The task pane is blank, or the connection fails | Your network must allow komplai's hub, sign-in and API over HTTPS. Ask your IT department to check. |
| **Word access is unavailable** after sign-in | Check that you chose the right organisation. Ask your organisation's administrator about your access to Redact. |
| Too many requests | Your personal request limit is shared with your other keys and your use of the hub, and your organisation shares one limit. Wait a moment and try again ([rate_limited](https://developers.komplai.dk/errors/rate_limited)). |
| The connection has expired | Sign in again. A connection lasts 24 hours and ends when you close Word. |

---

https://developers.komplai.dk/tools/redact-word
