View Single Post
  #2   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default inserting filenames in concatenate-files macro

I assume that you are doing this manually rather than through code (because
if the code was not problem for you, the filename should not be either)

If that is the way you are doing it, insert a { FILENAME } field at the top
of each the document - Use Ctrl+F9 to insert a pair of field delimiters { }
inside of which you type FILENAME (or filename, it doesn't matter), then
press Alt+F9 to toggle off the display of field codes, then select the field
and press F9 if necessary to cause the filename to be displayed, then use
Ctrl+Shift+F9 to unlink the field. The last step will convert the field
result to ordinary text so that it will be preserved when you combine the
documents.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

wrote in message
...
I have a bunch of DOC files that I need to combine into one master
file. That's no problem, but I need to include the filename before the
insertion of each file. So the master doc should look like this:

--

file1.doc

file1's contents inserted here.

file2.doc

file2's contents inserted here.

--

Please help.