title: c# Word Interop - Setting paragraph indentation
body: <p>I have a requirement to programatically (in C#) either switch on or off the hanging indent of a particular paragraph.</p>
  
  <p>I have created an add in, with a button that when clicked, executes code where I (attempt) to do this.  Its a toggle, so first click adds the Hanging indent and second click should remove it.</p>
  
  <p>In word, its the setting in <strong>Paragraph>Indentation</strong>, followed by the setting "<strong>Special</strong>" equal to <strong><em>None</em></strong> or <strong><em>Hanging</em></strong>.  </p>
  
  <p><a href="https://i.stack.imgur.com/2sepT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2sepT.png" alt="enter image description here"></a></p>
  
  <p>My best attempt at this is with the following code:</p>
  
  <pre><code>foreach (Footnote rngWord in Globals.OSAXWord.Application.ActiveDocument.Content.Footnotes)
      rngWord.Range.ParagraphFormat.TabHangingIndent(
          rngWord.Range.ParagraphFormat.FirstLineIndent == 0 ? 1 : -1);
  </code></pre>
  
  <p>It ONLY amends the last line in the paragraph for some reason.  I need it to be all lines which hang except the very first.  What am I doing wrong?</p>
  
  <p>Modifications:</p>
  
  <p><a href="https://i.stack.imgur.com/TRcd1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TRcd1.png" alt="enter image description here"></a></p>
  
  <p>Note - I'm actually performing this on footnotes in my document.  </p>