word 365
1 TopicWord on the web: support section PageSetup in Office.js
Please make Section.pageSetup (Word.PageSetup) available in Word on the web, as it is on desktop. It is WordApiDesktop 1.3 today, This would empower an add-in running in Word on the web cannot get a section's layout: whether it uses a different first page header/footer, how it starts (new page, continuous, odd, even), or its orientation and margins. Scenarios: Several common kinds of add-ins need to know the page layout of each section, and behave differently (or wrongly) in Word on the web because they can't read it: 1. Required text on every page. Document-management, compliance and legal add-ins stamp a document ID, confidentiality notice or disclaimer into headers/footers. To guarantee it appears on EVERY page, the add-in must know which header/footer types each section actually displays (first page, odd/even) and, combined with whether each part is linked to the previous section, whose content each page shows. Without this, a title page or even pages can silently go without the notice. 2. Formatting and pre-flight checks. Court filings, publishers and corporate style guides require specific paper size, margins and orientation. A checker add-in can do this on desktop but not on the web. 3. Inserting content that fits the page. Add-ins that insert tables, images or charts need the section's orientation, page width and margins to size content correctly -- e.g. a wide table going into a landscape section. 4. Continuous sections. A continuous section shares a page with the one above it, and that page shows only one set of headers/footers. Add-ins placing per-section header/footer content need sectionStart to know which pages a section really owns. Workarounds: Document.getFileAsync(Office.FileType.Compressed) returns the real .docx with the correct section properties, This however needs to fetch the entire document as compressed, unzip and parse the document. Not only can the docx be large but may lag the true state of the document. context.document.body.getOoxml() (Partia) - Can be used to get the OOXML and code can parse the to find the sectPr information. However, in word online this won't work for the last can't be used for the last section. The ending sectPr always has some default values not the current document. To read the proper values for the last SecPtr getFileAsync() needs to be used.41Views0likes1Comment