title: Fill word template data using openXML SDK
body: <p>I have an word file template and xml file for data. I want to find content Content control in word and get data from xml and then replace text in word template. i'm using the following code but it is not updating word file.</p>
  
  <pre><code>using (WordprocessingDocument document = WordprocessingDocument.CreateFromTemplate(txtWordFile.Text))       
  {
             MainDocumentPart mainPart = document.MainDocumentPart;
              IEnumerable&lt;SdtBlock&gt; block = mainPart.Document.Body.Descendants&lt;SdtBlock&gt;().Where
                  (r =&gt; r.SdtProperties.GetFirstChild&lt;Tag&gt;().Val == "TotalClose");
              Text t = block.Descendants&lt;Text&gt;().Single();
               t.Text = "13,450,542";
              mainPart.Document.Save();
  }
  </code></pre>