title: How to remove paragraph spacing in output using the Microsoft.Office.Interop.Word Library
body: <p>In my C# Desktop app i am using the <code>Microsoft.Office.Interop.Word</code> library to write to a word file. But whenever its done exporting there's huge spaces between paragraphs. Using the <code>paragraph1.Range.ParagraphFormat.SpaceAfter = 0;</code> parameter doesn't affect the result as well. 
  My desired result is the "No Spacing" preset in Word but after some research i found out it is not an option this library. 
  Is there any way to remove or set the spacing between paragraphs.
  This is my code:</p>
  
  <pre><code> Microsoft.Office.Interop.Word.Application word = new Application();
   word.Visible = false;
   var doc = word.Documents.Add();
   var paragraph1 = doc.Content.Paragraphs.Add();
  
   paragraph1.Range.Font.Name = "Calibri";
   paragraph1.Range.Font.Size = 11;
  
   paragraph1.Range.ParagraphFormat.SpaceBefore = 0;
   paragraph1.Range.ParagraphFormat.SpaceAfter = 0;
  
   paragraph1.Range.Text = story;
   paragraph1.Range.InsertParagraphAfter();
  
   doc.SaveAs2(@"F:\Documents\Visual Studio Projects\LITPC\LITPC\bin\Debug\"+title+".docx");
  
   word.Quit();
  </code></pre>