public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Text();
// ExStart:LineSpacing
// Create an instance of Presentation class
Presentation presentation = new Presentation(dataDir + "Fonts.pptx");
// Obtain a slide's reference by its index
ISlide sld = presentation.Slides[0];
// Access the TextFrame
ITextFrame tf1 = ((IAutoShape)sld.Shapes[0]).TextFrame;
// Access the Paragraph
IParagraph para1 = tf1.Paragraphs[0];
// Set properties of Paragraph
para1.ParagraphFormat.SpaceWithin = 80;
para1.ParagraphFormat.SpaceBefore = 40;
para1.ParagraphFormat.SpaceAfter = 40;
// ExEnd:LineSpacing
// Save Presentation
presentation.Save(dataDir + "LineSpacing_out.pptx", SaveFormat.Pptx);
}
}