title: Prevent paragraph from being edited in a Word document using SDK 2.0
body: <p>I am using  <code>Open XML SDK</code> to add  a serial number to each document that the user will download.</p>
  
  <p>This is the code:</p>
  
  <pre><code>public static void OpenAndAddTextToWordDocument(string filepath, string txt)
  {
      // Open a WordprocessingDocument for editing using the filepath.
      WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(filepath, true);
  
      // Assign a reference to the existing document body.
      Body body = wordprocessingDocument.MainDocumentPart.Document.Body;
  
      // Add new text.
      Paragraph para = body.AppendChild(new Paragraph());
  
  
  
      Run run = para.AppendChild(new Run());
      run.AppendChild(new Text(txt));
  
      DocumentWatermarkTest.AddWaterMark(wordprocessingDocument);
  
      // Close the handle explicitly.
      wordprocessingDocument.Close();
  }
  protected void Button1_Click1(object sender, EventArgs e)
  {
      string strDoc = @"C:\Users\xxx\Desktop\2138-1.doc";
      string strTxt = "Serial number: 23jl4hk52345h32jkl";
      OpenAndAddTextToWordDocument(strDoc, strTxt);
  }
  </code></pre>
  
  <p>Now I need to prevent the user to delete the serial number when he opens the doc.</p>
  
  <p>I read in the Open XML SDK 2.0 FAQ:</p>
  
  <blockquote>
    <p>Open XML SDK only support features to protect a document such as
    preventing the sheet from being edited in UI</p>
  </blockquote>
  
  <p>However, it does not explain how you do it.</p>