I have a document with a variable being referred to several times on different pages. This is the same variable and so its value is the same on each page. If I need to change this variable I would like to be able change it only in one place and have this change all the other instances of this variable. Similar to when you refactor a variable in code. I can do a find and replace, but the problem is when I have several variables with the same value the find and replace will not differentiate between them, meaning I would need to click through every instance manually and decide if to replace that instance or not.

Is there a way to insert text or mark it in some way so that the document knows that this piece of text is the same as other instances and that changing one changes all others. This is similar to how text in the header and footers work, where changing one header changes all of them, except this would be in the body of the document.

2 Answers 2


A standard way to handle repeated text is to use bookmarks in conjunction with REF fields. Each bit of repeated text is stored in a bookmark, and each repetition of that text is inserted via a REF field that is linked to the bookmark. So it doesn't matter if two bookmarks happen to store identical looking text at a given time.

  1. Select the text that needs to be repeated, and insert a bookmark (on the Insert tab, in the Links group, click Bookmark).
  2. At each place where you need the text repeated, insert a REF field (on the Insert tab, in the Text group, click Quick Parts > Field, select Ref, and then select the name of the bookmark in the list).
  3. After you change the bookmarked text, select the whole document, and then press F9 to update the REF fields.

As came up in another recent question, it helps if you make bookmarks visible if they aren't (click File > Options > Advanced, and then, under Show document content, select Show bookmarks). Otherwise, when you change the text, some of the new text might end up outside the bookmark, and your changes won't be propagated. When the bookmarks are visible, you can see whether all the new text is correctly inside the bookmark.


This worked fine, but not when using the text in headers. My use case is a version number that should be shown in the header of each page. Since the header on the first page in versioned documents is typically different from other pages, one would need to go to all other headers that are different and do Select all + F9. This means that one could as well change the version number manually. Is there another way to ensure that all pages show the correct and up-to-date version number without a need for additional steps? I tried to create a heading type to be able to cross-reference it, but that didn't work. It seems that text in headers/footers cannot be cross-referenced.

  • Welcome to Superuser! If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context.
    – Joseph
    Commented Feb 26, 2021 at 9:43
  • This should be posted as a new question to get the best answers. You can include a link back here if you want to use this question and responses as a reference point. You may be able to use a Mapped Content Control. See my page on repurposing Document Property Content Controls. addbalance.com/word/MappedControls.htm#PageStart Again, please post this as a new question, then delete this post. Your post is NOT an answer and is a violation of the code of conduct for SuperUser. It messes up the forum for other users. Commented Feb 26, 2021 at 18:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .