Skip to main content

Migrate Word Documents with Automated Replacements

Moving a file server to Microsoft 365 or SharePoint Online copies the documents, but it does not fix what is written inside them. A contract that links to \\fileserver01\legal\templates still points at a machine that is being switched off. A policy that says "see the intranet at hq-portal" sends readers to a site that no longer exists. Footers still carry the old company name and an old support address.

WordPipe is a batch editor for Microsoft Word. It applies a list of search and replace pairs to every DOC, DOCX and RTF file in the folders you select, including headers, footers and document properties. Used before upload, it lets you migrate Word documents with automated replacements, so the files arrive in Microsoft 365 already pointing at the right places. This page covers the replacement step of a move. For planning the move itself, see automating document migration for Microsoft Word.

When to Use This

Use batch replacement during a move when the content of documents refers to where documents used to live. Typical triggers:

  • File server to SharePoint. UNC paths and mapped drive letters inside hyperlinks must become SharePoint library URLs.
  • Tenant or domain change. Addresses on an old domain need to switch to the new tenant domain.
  • Site restructuring. Several old team folders merge into one site, so many path prefixes change at once.
  • Branding done in the same project. Teams often rename products or departments during the move, and one pass is cheaper than two.
  • Retiring references. Names of decommissioned systems, old phone numbers and obsolete email aliases need to be removed or replaced.

If you only need generic bulk editing with no move involved, see the Word document batch processing tool. For a run owned by an IT team across many departments, see Word document automation for IT departments.

Step-by-Step Configuration

  1. Inventory what breaks. Open a sample of twenty to fifty files from different teams. Note every old server name, path, URL, mailbox and brand name. Record each variant, such as \\fileserver01\legal, //fileserver01/legal and L:\legal.
  2. Decide the new targets. Map each old location to its final SharePoint library URL before you start. Changing the target mid-run means running again.
  3. Enter pairs, longest first. Put \\fileserver01\legal\templates above \\fileserver01\legal so the shorter path does not match inside the longer one.
  4. Select copies of the source folders. Work on a copy, include subfolders, and keep the original untouched until sign-off.
  5. Choose document parts. Tick body text, headers, footers, text boxes and document properties. Old names often survive in footers and in the Title property.
  6. Pilot, then run. Process about twenty files, read the log, click several converted links, and then run the full set.
  7. Upload. Move the corrected copies with your migration tool, then spot-check a few from within SharePoint.

Typical pairs for a SharePoint move

SituationSearchReplace
UNC path to library\\fileserver01\legalhttps://contoso.sharepoint.com/sites/legal/Shared%20Documents
Mapped driveL:\legalhttps://contoso.sharepoint.com/sites/legal/Shared%20Documents
Old intranethttp://hq-portal/https://contoso.sharepoint.com/sites/hq/
Retired mailboxdocs@oldname.comdocs@contoso.com

Spaces in SharePoint URLs appear as %20. Copy a real link from a working library page so your replacement matches exactly.

Original Example: Moving a Regional Engineering Firm to Microsoft 365

Harbor Ridge Engineering kept 11,400 Word files on two Windows servers: proposals, specifications, site reports and templates, built up over fifteen years. The firm planned a weekend cutover to SharePoint Online and a switch from its old domain to a new one after a merger. A sample audit of 150 files found that 112 contained at least one link or address that would break after the move: UNC paths in 86 files, the old intranet address in 61, and the retired @harborridge-old.com email domain in 94, often more than one type per file.

The IT lead entered eight pairs, longest first, and processed a copy of each source folder:

  • \\hre-fs02\projects\specs became the Specifications library URL
  • \\hre-fs02\projects became the Projects site URL
  • \\hre-fs01\templates became the Templates library URL
  • http://hre-intranet/ became the new hub site address
  • @harborridge-old.com became @harborridge.com

Before, a typical specification footer read: "Template: \\hre-fs01\templates\spec-base.dotx. Questions: standards@harborridge-old.com." After the run it read: "Template: https://harborridge.sharepoint.com/sites/templates/Shared%20Documents/spec-base.dotx. Questions: standards@harborridge.com."

The pilot on twenty files showed that links containing spaces had been matched only up to the first space, so the analyst added a second pair for the encoded form. The full run processed 11,120 files in 74 minutes and logged 38,900 replacements. Files with no matches were passed through untouched. Re-auditing the same 150 sampled files after upload found zero broken links. The team estimated 190 hours of manual correction and spent about 14 hours, including the pilot and review, and the helpdesk received 6 link-related tickets in the first month, compared with the 120 they had budgeted for.

Common Pitfalls

  • Editing the only copy. Run against copies, so the original server data stays available until the migration is accepted.
  • Missing path variants. Backslash, forward slash and drive letter forms are separate searches, as are encoded and unencoded spaces.
  • Pair order. A short prefix processed before a longer one leaves half-converted links.
  • Moving the target. If a library is renamed after the run, every link has to be changed again.
  • Hidden locations. Headers, footers, text boxes and document properties can hold old references after the body is fixed.
  • Links to files that did not move. Some documents link to systems outside the migration. Pairs that are too broad can break working links, so check the log counts per pair.
  • Page layout. A long SharePoint URL can wrap differently from a short path. Check fixed-layout forms.

FAQ

Should I run replacements before or after moving files to SharePoint?

Before is simpler. Run WordPipe on a copy of the files on the source server, then upload the corrected copies. The links are right the first time anyone opens them in the new location.

Does WordPipe update links to other documents in the same library?

Yes, if you add a pair for the old path prefix and its new SharePoint URL prefix. Check the full link, including spaces and encoded characters, in a sample file first.

Will the migration tool or WordPipe change my formatting?

WordPipe keeps character formatting such as fonts, bold and numbering. Longer replacement text can shift page breaks, so check long documents after a pilot run.

Can I undo a run that replaced the wrong text?

Runs can be logged and reversed, but keep an untouched copy of the source folders until the migration is signed off.

Related Use Cases

Start Using WordPipe Today

Download WordPipe Free Trial

Buy WordPipe Now