
微軟文本檢索

You probably have some text that you type often in your Word documents, such as addresses. Instead of retyping this text every time you need it, you can put this common text into one Word document and reference it in other documents–it’ll even automatically update in all your documents if you change it.
您可能有一些經常在Word文檔中鍵入的文本,例如地址。 您可以將此通用文本放入一個Word文檔中,并在其他文檔中進行引用,而不必每次都重新鍵入該文本,如果更改,它甚至會在所有文檔中自動更新。
Say you want to put your address in the footer of your documents, but the address changes from time to time. You can store the address in a separate, common Word document and use a field in your report to pull the text from the common document, and update whenever it changes. We’ll show you how to do this.
假設您想將地址放在文檔的頁腳中,但是地址會不時更改。 您可以將地址存儲在單獨的通用Word文檔中,并在報告中使用字段從通用文檔中提取文本,并在更改時進行更新。 我們將向您展示如何執行此操作。
To begin, create a new Word document that will serve as your repository for the address you want to insert into other Word documents. Save it in a location that will be accessible by other documents. For example, don’t save it on a network drive to which you don’t always have access.
首先,創建一個新的Word文檔,它將用作您要插入其他Word文檔中的地址的存儲庫。 將其保存在其他文檔可以訪問的位置。 例如,不要將其保存在并非總是具有訪問權限的網絡驅動器上。
We’re going to use bookmarks to refer to the address in our common document. Type?the string of text?you want to insert into other documents (in our case, the address). Create a bookmark by highlighting the name and going to Insert > Bookmark and giving it a name, like “Address”. See our guide to bookmarks in Word?for information on creating them.
我們將使用書簽來引用我們的普通文檔中的地址。 鍵入要插入其他文檔的文本字符串(在我們的示例中為地址)。 通過突出顯示名稱并轉到插入>書簽并為其命名,例如“地址”,來創建書簽。 有關創建書簽的信息,請參見Word中的書簽指南。
Note that bookmark names cannot have any spaces. We recommend putting the name of the bookmark above each item in your common information file so you easily know which name?to use for which item. This is especially useful if you plan to have a lot of reusable items in this common document. In our example, we added our address to the common information document and put the bookmark name, “Address”, above the item.
請注意,書簽名稱不能有任何空格。 我們建議將書簽的名稱放在公共信息文件中每個項目的上方,以便您輕松知道要為哪個項目使用哪個名稱。 如果您打算在此公共文檔中有很多可重復使用的項目,則此功能特別有用。 在我們的示例中,我們將地址添加到公共信息文檔中,并將書簽名稱“地址”放在項目上方。

Once you’ve added the item to your common document, you can save and close. Open the document in which you want to insert the address and position the cursor where you want that text to go. For our example, we’re going to add a footer and insert the address there.
將項目添加到普通文檔后,即可保存并關閉。 打開您要在其中插入地址的文檔,然后將光標置于您要輸入文本的位置。 對于我們的示例,我們將添加一個頁腳并在其中插入地址。

We’re going to use the INCLUDETEXT field code to refer to the bookmark we created in the common document. To do this, press “Ctrl + F9” to insert the brackets for the field code.
我們將使用INCLUDETEXT域代碼來引用我們在通用文檔中創建的書簽。 為此,請按“ Ctrl + F9”以插入域代碼的括號。
NOTE: You cannot just type normal brackets around field codes. You must use “Ctrl + F9” to insert the correct type of brackets.
注意:您不能只在域代碼周圍輸入普通括號。 您必須使用“ Ctrl + F9”插入正確的括號類型。

The cursor is automatically placed in between the brackets. Type the following text between the brackets, replacing the “<path to file>” with the absolute full path to your common Word containing the name you want to insert. Replace “<bookmark name>” with the bookmark name you assigned to the item in the common document.
光標會自動放在括號之間。 在方括號之間鍵入以下文本,將“ <文件路徑>”替換為包含要插入名稱的通用Word的絕對完整路徑。 將“ <書簽名稱>”替換為您為普通文檔中的項目分配的書簽名稱。
INCLUDETEXT "<path to file>" <bookmark name>
NOTE: Do not enter the brackets in the field code.
注意:請勿在域代碼中輸入括號。
For example, we typed the following in between the field code brackets:
例如,我們在域代碼括號之間鍵入以下內容:
INCLUDETEXT "C:\\Users\\Lori\\Documents\\Common Information\\CommonInformation.docx" Address
NOTE: You must use double backslashes in the path, like we did. Also, make sure you use straight quotes, not smart quotes, when typing the above code into the field.
注意:必須像我們一樣在路徑中使用雙反斜杠。 另外,在字段中鍵入上述代碼時,請確保使用直引號而不是智能引號。

To grab the address from the common document and insert it into the field code you just entered, right-click on the field code and select “Update Field” from the popup menu.
要從通用文檔中獲取地址并將其插入剛輸入的域代碼中,請右鍵單擊該域代碼,然后從彈出菜單中選擇“更新域”。

The address displays in the document. Brackets still display around the address if you have the “Show bookmarks” option on. Again, see our article about bookmarks to learn how to turn off this option. Also, the field code might be shaded. However, you can also turn this off.
地址顯示在文檔中。 如果您啟用了“顯示書簽”選項,則括號仍會顯示在地址周圍。 同樣,請參閱我們有關書簽的文章,以了解如何關閉此選項。 此外,該域代碼可能會被加陰影。 但是,您也可以關閉此功能。

If you want to change the field code, you can display the code again rather than the result. To do this, right-click on the resulting item and select “Toggle Field Codes” from the popup menu. The text you typed into the field code displays again and you can edit it. Simply, update the field to display the new result.
如果要更改域代碼,可以再次顯示該代碼而不是結果。 為此,右鍵單擊生成的項目,然后從彈出菜單中選擇“切換域代碼”。 您在域代碼中鍵入的文本將再次顯示,您可以對其進行編輯。 只需更新字段以顯示新結果。

Once you’ve created your common document, you can use it to store other items you often type into your Word documents. Simply use a separate INCLUDETEXT field in your Word documents for each piece of information you want to automatically insert from your common document.
一旦創建了通用文檔,就可以使用它存儲您經常在Word文檔中鍵入的其他項目。 只需在Word文檔中使用單獨的INCLUDETEXT字段,即可獲取要從普通文檔中自動插入的每條信息。
翻譯自: https://www.howtogeek.com/240026/how-to-reference-text-from-other-documents-in-microsoft-word/
微軟文本檢索