title: How do I find and replace text in the footer of a word document in a VB.net application?
body: <p>I am writing an VB.net application that takes a Word document as a template and finds and replaces several tags within the document. I can do this for the body text just fine, but I am not able to get this to work for text in the document's footer. How can I accomplish this?</p>
  
  <pre class="lang-vb prettyprint-override"><code>Imports Microsoft.Office.Interop
  
  Dim oWord As Word.Application
  Dim oDoc As Word.Document
  
  Public Sub Create_Report()
      Dim clientName As String = InputBox("Enter the [Client Contact's Name] for the report:")
      Dim empName As String = InputBox("Enter the [Employee's Name] for the report:")
  
      oWord = CreateObject("Word.Application")
      oWord.Visible = True
      oDoc = oWord.Documents.Add("template.dotx")
  
      ReplaceTemplateText("&lt;&lt;&lt;Contact&gt;&gt;&gt;", clientName)
      ReplaceTemplateText("&lt;&lt;&lt;Employee&gt;&gt;&gt;", empName )
  
      oDoc.SaveAs("report.docx")
      oDoc.Close()
      oWord.Quit()
  
      MsgBox("Report Complete", MsgBoxStyle.OkOnly)
  End Sub
  
  Public Sub ReplaceTemplateText(findWord As String, replaceWord As String)
      'Replace text in the Template document with input text
  
      'Body
      oDoc.Content.Find.Execute(FindText:=findWord, ReplaceWith:=replaceWord, Replace:=Word.WdReplace.wdReplaceAll)
  
      'Footer
       ???
  End Sub
  </code></pre>