office-js

office addin dev 2016 and newer: how to add insert new page / slide button in the task pane app

偶尔善良 提交于 2020-07-23 06:50:24
问题 I am looking for directions (API reference / samples) to create a insert new page buttons along with Slide number grid view for quick navigation to slides in Powerpoint 2013 and newer additions with an addin For this I guess we would need the Office JS Api to i) Read the current number of slides, ii) Event listeners for add / remove slide iii) Insert / Duplicate particular slide into presentation iv) Navigate to particular slide So, to begin with I started following - https://docs.microsoft

How do I add a bookmark within the body of a Word doc using Office JS

我与影子孤独终老i 提交于 2020-07-08 05:53:10
问题 The Office JS has provided the following function in preview, but I couldn't find any example. Here is what I tried but it doesn't seem to work, any idea what I am missing here, since this code inserts the text but the bookmark is not created. Word.run(function (context) { let range = context.document.getSelection(); return context.sync().then(function () { range.insertText(`Test Bookmark`, Word.InsertLocation.replace); let uniqueStr = new Date().getTime(); let bookmarkName = `Test

How do I add a bookmark within the body of a Word doc using Office JS

喜欢而已 提交于 2020-07-08 05:53:09
问题 The Office JS has provided the following function in preview, but I couldn't find any example. Here is what I tried but it doesn't seem to work, any idea what I am missing here, since this code inserts the text but the bookmark is not created. Word.run(function (context) { let range = context.document.getSelection(); return context.sync().then(function () { range.insertText(`Test Bookmark`, Word.InsertLocation.replace); let uniqueStr = new Date().getTime(); let bookmarkName = `Test

How to add a new connection using Office JS Excel Add-In to retrieve and show data from an OData Service?

和自甴很熟 提交于 2020-06-29 03:47:13
问题 We use the following method to add a connection to our OData service in VSTO Excel Add-In. Now we are planning to rewrite the add-ins using Office JS. What is the similar approach in Office JS Excel Add-In to load data from the OData service? string connectionString = "DATAFEED;Data Source=http://localhost:8443/OData/ODataService.svc/Products?$filter=Company_Code eq 'TY';Namespaces to Include=*;Max Received Message Size=4398046511104;Integrated Security=Basic;User ID=testuser;Password=123

Is there a way to bind Word content controls to a custom XML Part using office-js?

不想你离开。 提交于 2020-06-28 05:07:10
问题 I'm pretty new to the Office.js/Word.js features. Trying to determine if there is there a way to bind Word content controls to a custom XML Part using the current feature sets for Office (JavaScript) Add-Ins. If not, anyone know if this feature has been requested? It can be done in the VBA and VSTO object models using by assigning an XML Mapping using XPATH. Thanks, Alan 回答1: there is no API to directly do this, however you can achieve it using OOXML insertion. Make sure to get the OOXML that

Outlook add-in : Get shared mailbox ItemAttachment using EWS

丶灬走出姿态 提交于 2020-06-27 04:09:09
问题 Our outlook add-in works in most scenarios on a shared Mailbox, except when the attachment in an email is of type " Office.MailboxEnums.AttachmentType.Item " e.g " .msg " file. Environment is Outlook web and desktop. We mostly get all attachment content via REST, as they are returned as base-64, but with " AttachmentType.Item " the body is email body and not a base-64. In this case, we make a call to EWS to download that attachment, process the body and return as byte[]; The problem we are

ADD-IN ERROR - This add-in cloud not be started. - CRITICAL

╄→гoц情女王★ 提交于 2020-06-24 16:47:22
问题 I have notice this error happens for ALL modern Outlook Office Add-ins. Searching the net I can also see that many other Modern Outlook Add-ins are having the same issue. We know that this is an Outlook Client issue. You never get the error on OWA. I have also seen that Microsoft are suggesting Open Internet Explorer Click Tools Click Internet Options Click Security tab Select Internet Sites zone Select Enable Protected Mode (make sure box is un checked) Click OK Restart Internet Explorer and

ADD-IN ERROR - This add-in cloud not be started. - CRITICAL

▼魔方 西西 提交于 2020-06-24 16:46:58
问题 I have notice this error happens for ALL modern Outlook Office Add-ins. Searching the net I can also see that many other Modern Outlook Add-ins are having the same issue. We know that this is an Outlook Client issue. You never get the error on OWA. I have also seen that Microsoft are suggesting Open Internet Explorer Click Tools Click Internet Options Click Security tab Select Internet Sites zone Select Enable Protected Mode (make sure box is un checked) Click OK Restart Internet Explorer and

How do I read OneNote indented paragraphs using OneNote Javascript APIs?

放肆的年华 提交于 2020-06-23 11:24:24
问题 I have a notebook that contains these The docs for OneNote APIs are here (paragraph class selected already) https://docs.microsoft.com/en-us/javascript/api/onenote/onenote.paragraph?view=onenote-js-1.1 If I run this code: export async function run() { try { await OneNote.run( async context => { var page = context.application.getActivePage(); var pageContents = page.contents; var firstPageContent = pageContents.getItemAt(0); var paragraphs=firstPageContent.outline.paragraphs //firstPageContent