title: How to copy specific slides of one PowerPoint presentation to another?
body: <p>I have below code using which trying to copy specific slides of one presentation to another but its not happening neither i am getting any error.</p>
  
  <pre><code>source = ppt.Presentations.Open(filename, MsoTriState.msoTrue, 
  MsoTriState.msoTrue, MsoTriState.msoTrue);
  
  target = ppt.Presentations.Open(targetname, MsoTriState.msoTrue, 
  MsoTriState.msoTrue, MsoTriState.msoTrue);
  
  sourceSlideRange = source.Slides.Count;
  
  for (int i = 3; i &lt; sourceSlideRange; i++)
  {
  source.Slides[i].Copy();
  target.Windows[1].Activate();
  target.Slides[1].Select();
  
  target.Application.CommandBars.ExecuteMso("PasteSourceFormatting");
  }
  </code></pre>
  
  <p>What's wrong in my code? Please suggest.Thanks</p>