Thanks
this should be possible! :-) First, see the article "Insert into a
document the names of all files in a selected folder" at
http://www.mvps.org/word/FAQs/MacrosVBA/InsertFileNamesContent.htm .
After running the macro delete the last empty line and use this macro to
convert the file names into field names:
Sub DocNames2Fields()
Dim NoOfParagraphs As Integer, i As Integer
Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory
NoOfParagraphs = ActiveDocument.Paragraphs.Count
Do
Selection.HomeKey Unit:=wdLine
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
Selection.TypeText Text:="IncludeText "
Selection.MoveDown Unit:=wdLine
i = i + 1
Loop Until i = NoOfParagraphs
ActiveWindow.View.ShowFieldCodes = False
Selection.WholeStory
Selection.Fields.Update
Selection.HomeKey Unit:=wdStory
End Sub
Now select the complete document (Ctrl + A) and unlink the fields with
Ctrl + Shift + F9.
Greetings from Germany
Lutz