title: PowerShell add field codes to ms word footer
body: <p>I have field codes set up in some documents which will display the current date when it is printed, but be invisible the rest of the time, as far as I know. I now need to apply this footer to hundreds of documents. It seems like this should be possible to do with PowerShell, but I don't really know how to use it, and can't find a good reference/documentation (So far I have gotten it to open a document, replace text, and close the document). I would like the following Field Code to be on the right side of every footer section:</p>
  
  <p>{ IF{PRINTDATE \@ "M/d/yyyy h:mm"}={DATE  \@ "M/d/yyyy h:mm"} "UNCONTROLLED COPY AS OF { DATE \@"M/d/yyyy"}" "         "</p>
  
  <p>I know that is probably a terrible way to do that, but, the real question is, how do you add field codes to footers in Word 2007 documents using PowerShell? </p>