I would like to add a section at any point in the document, not just at the end.
For Example: I have a document with 9 sections. I want it so open to make changes dynamically from code. I position it in the exact recovering the desired section with
- Code: Select all
Section section = document.Sections [2];
At this point I would like to insert a new section between the section number 2 and number 3 (since then a total of 10 sections), but if I try to do so
- Code: Select all
Section section = document.AddSection ();
rightly I add the section at the bottom of the document.
What is the correct way to do what I want?