Enter the Field-Creation Program Code
This task will make use of both field codes and bookmarks. Start with the field code functionality first: re-enter the Visual Basic IDE by pressing alt-F11. Double-click Normal>Microsoft Word Objects>ThisDocument on the Properties window, and select a clear space to enter the following code into:
Public Sub insertLink()
Dim p, q, s As String
'create the link field code text
p = ActiveDocument.FullName
q = Replace(p, "\", "\\") 'Must escape filename backslashes
s = "link word.document.12 " & q & " bm \a \r"
Selection.Fields.Add Range:=Selection.Range, Text:=s
Return to Word and assign a shortcut key to the macro: click the round MS Office button, then Word Options>Customize, and then the Customize button next to Keyboard shortcut. In the Customize keyboard window, select the Macro category and the InsertLink Macro. Enter a shortcut like Alt-L, then close the window.
While you're still in the Word Options window, select the option to display bookmarks: Choose Advanced, scroll down to the "Show document content" heading, and check the Show bookmark checkbox. Return to the main document.
Compose the letter in our letter-writing scenario. Start the letter with this greeting:
Dear Mr. Perkins:
Bookmark the addressee, Mr. Perkins: select the "Mr. Perkins" text, click Insert>Bookmark, then add the bookmark "bm" to the selected text. Close the window to return to Word, and resume the letter writing with the following text, being sure to follow the instructions to "press alt-L."
The Halibut was delicious. Thank you for taking the time to prepare it. You are truly one-of-a kind, [press alt-L]. Finding another like you would be an impossible task.
So long, [press alt-L], and thanks for all the fish.
When you're done writing the letter, update its field codes by selecting the whole document and pressing F9. The field codes will display the text you bookmarked: Mr. Perkins. Change the addressee now: position the cursor just inside the left brace of the "Mr. Perkins" bookmark. Type in "Mrs. Tillman" (without quotes), and delete the extra text up to the closing brace.
Select the whole document and press ctrl-A once again to update the field codes, which should now show "Mrs. Tillman."