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.
- Go to Insert >> Object
- 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:
- Go to the
Insert
tab on the ribbon - In the
Text
section of theInsert
tab, choose the drop-down option beside theObject
button - Choose
Text from File
- Navigate to your text file and select it with one mouse click (do not insert it yet)
- Press the drop-down on the
Insert
button, and selectInsert 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:
- Place your cursor where you want the file inserted
- Press
Ctrl+F9
- Type
{ INCLUDETEXT "C:\\path\\to\\file.txt" \c AnsiText \* MERGEFORMAT }
. Do not type the brackets. Do type the double-backslashes. - 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