Embedding Text File (Link to text file) in MS Word

I have been trying to embed a text file like we can do with Word files.

  1. Go to Insert >> Object
  2. Check the box which says "Insert as a link"

At this instance, there is no option for text files. I can achieve this with Word files but not with txt and mht files.

I need to embed those in my Word document and do not want to send a dozen files across along with the document.


Solution 1:

Unfortunately, text (.txt) files and .mht files are not 'objects' in the sense of what Microsoft Office considers to be an embeddable object.

Solution 2:

I'm unsure which version of Word you're using, but here's how you can do it in 2010:

  1. Go to the Insert tab on the ribbon
  2. In the Text section of the Insert tab, choose the drop-down option beside the Object button
  3. Choose Text from File
  4. Navigate to your text file and select it with one mouse click (do not insert it yet)
  5. Press the drop-down on the Insert button, and select Insert as Link

Your .txt file is now inserted as a field. After you update the file, click the field in your word document and press F9 to see the new text. To update all fields at once, select the whole document (Ctrl+A) then press F9.

Alternate method:

  1. Place your cursor where you want the file inserted
  2. Press Ctrl+F9
  3. Type { INCLUDETEXT "C:\\path\\to\\file.txt" \c AnsiText \* MERGEFORMAT }. Do not type the brackets. Do type the double-backslashes.
  4. Press F9

Note that \* MERGEFORMAT is only necessary if you want the field to assume the formatting of the surrounding text.

Solution 3:

A simple copy/paste of the text files should do the trick.

Locate the text files on your computer, select the specific files, right click your mouse and select copy, go to your word document, and paste in there, the text files will be embedded. This worked for me in Word 2007