title: Word macro that adds the file name to the body text of a series of Word documents in a folder
body: <p>I need a Word macro that adds the file name of a document to the first line of that Word document.  But not just one document at a time.  I would like the Macro to add these file names to a series of Word documents in a particular folder (with each document getting their own file name).</p>
  
  <p>A Macro that adds the file name to document is simple:</p>
  
  <pre><code>Selection.HomeKey Unit:=wdStory
  Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
      Text:= "FILENAME  "
  Selection.TypeParagraph
  </code></pre>
  
  <p>But how can I get it to add file names to an entire series of documents in a folder?   I suppose the folder could be named in the Macro.  For example: <code>C:\Users\username\Desktop\somefolder\</code>.  I also suppose that a Loop could be used to go through the folder until the loop gets to the end of the documents in the folder.</p>