Return a |Section| object newly added at the end of the document. The optional `start_type` argument must be a member of the :ref:`WdSectionStart` enumeration, and defaults to ``WD_SECTION.NEW_PAGE`` if not provided.
(self, start_type: WD_SECTION = WD_SECTION.NEW_PAGE)
| 138 | return run.add_picture(image_path_or_stream, width, height) |
| 139 | |
| 140 | def add_section(self, start_type: WD_SECTION = WD_SECTION.NEW_PAGE): |
| 141 | """Return a |Section| object newly added at the end of the document. |
| 142 | |
| 143 | The optional `start_type` argument must be a member of the :ref:`WdSectionStart` |
| 144 | enumeration, and defaults to ``WD_SECTION.NEW_PAGE`` if not provided. |
| 145 | """ |
| 146 | new_sectPr = self._element.body.add_section_break() |
| 147 | new_sectPr.start_type = start_type |
| 148 | return Section(new_sectPr, self._part) |
| 149 | |
| 150 | def add_table(self, rows: int, cols: int, style: str | _TableStyle | None = None): |
| 151 | """Add a table having row and column counts of `rows` and `cols` respectively. |