title: c# interop Word insert landscape page
body: <p>I´m trying to insert a landscape page into a Word document. But it changes all the pages to landscape. How can I insert only one landscape page in my word document?</p>
  
  <p>My code: </p>
  
  <pre><code>object wdSectionBreakNextPage = 2;
          //object pageBreak = 7; //el 7 es el tipo. https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word.wdbreaktype?view=word-pia
          rngDoc.Select();
          //rngDoc.InsertBreak(pageBreak);
          rngDoc.InsertBreak(wdSectionBreakNextPage);
          rngDoc.PageSetup.Orientation = WdOrientation.wdOrientLandscape;
          rngDoc.PageSetup.DifferentFirstPageHeaderFooter = 0;
          Microsoft.Office.Interop.Word.Paragraph para = rngDoc.Paragraphs.Add();
          para.Range.InsertParagraphAfter();
  </code></pre>