Is there something you can do when writing a MS Word document that allows one to link a variable name to any selected text? And do so in a user friendly way using the tools available out of the box?

For example, a resume/CV written in MS Word will have the following information written in ways and places entirely at the writers choice.

  • First name
  • Last name
  • Telephone number
  • Email address
  • Degree level education
  • A company I've worked for

The idea is that I want to write a program which programmatically reads through the Word doc looking for words/statements associated with each of the variables.


You can use bookmarks with specific names to mark those items. Then later you can use code to search for these bookmarks and extract their text.

For example, select the first name, then Click Bookmark on the Insert tab. Assign a specific name to this bookmark, like FirstName, and this will be the name you will use when coding your program.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.