OfficeDev/office-js

How to read/retrieve section break("Next Page") in Word using office.js

Closed this issue · 3 comments

My Environment
Platform : PC desktop
Host: Word
Office version number: Microsoft® Word for Microsoft 365 MSO (Version 2404 Build 16.0.17531.20140) 64-bit
Operating System: Microsoft Windows 11 pro

Hello Team,
I have a requirement to analyze(read) section breaks in a Word document, specifically to determine whether they are "Next Page" or "Continuous." Based on section break "Next Page", I need to break the document into sections accordingly.
Is there an existing method or feature available in Office.js or any plans to introduce such functionality for reading and working with section breaks programmatically in Word documents?

hi @Jayshiv1408Dev thanks for reporting this. Unfortunatelly so far there is no direct APIs to get all the section breaks and their types (though we can get all the section collection by context.document.sections and insert a section break by the insertBreak method). We track Office Add-in feature requests on our Microsoft 365 Developer Platform Ideas Forum. Please add your request there. Thanks.

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.