office-js

Add Outlook Web Addin Function to context menu

我只是一个虾纸丫 提交于 2019-12-11 06:35:51
问题 Is it possible to add an Outlook Web Addin function to the context menu? As it was possible with the old VSTO Addins: I only find some examples with tab ribbons, like: <!--PrimaryCommandSurface==Main Office Ribbon--> <ExtensionPoint xsi:type="PrimaryCommandSurface"> <CustomTab id="Contoso.Tab1"> <Group id="Contoso.Tab1.Group1"> <Label resid="Contoso.Tab1.GroupLabel" /> <Icon> <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon" /> <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon" />

What browser does Office 2016 on Mac use for taskpanes?

眉间皱痕 提交于 2019-12-11 06:20:51
问题 I've got a Word add-in working well on Windows, and the basics are working on Mac also (Word 2016 both). What browser does Word 2016 for Mac use? I see this post: What browser / browser engine do Office Add-ins use? But it doesn't explicitly define the way Mac does it. I see posts about clearing the cache, which is helpful (that will be my next challenge) like How to clear client side browser cache for Excel 2016 Task Pane add-in on Mac?. Specific reason I'm asking is trying to use Firebase

Load Excel file in MS Word Add-in with Office.js

丶灬走出姿态 提交于 2019-12-11 06:17:36
问题 I am trying to create an add-in for MS Word where I can choose an excel file from some kind of file picker and then use that data to generate multiple pages (invoices) in the word doc. The problem is, I can't seem to figure out what syntax I need to load an external Office file in the Add-in. Thanks for any pointers. I am on a mac with Office 2016 so VBA is pretty much out of the question. 回答1: You could access the external Excel file using the Microsoft Graph web services. You can find

No results when setting the firstpage header

别来无恙 提交于 2019-12-11 06:16:25
问题 When you look at the documentation for office-js api's you have three header locations: primary firstpage even I would expect that setting a firstpage header would only show on the first page. However I doesn't seem to do anything. Am I missing something? The documentation is not very clear on this. In this sample only the primary is showing up. private setHeader(): void { Word.run((context) => { let body = context.document.body; let sections = context.document.sections; context.load(sections

Transfer values between Excel buttons

こ雲淡風輕ζ 提交于 2019-12-11 06:15:37
问题 Is there a way to transfer values between two Excel buttons in Excel ribbon. e.g. click of button1 - save a value say x click of button2 - retrieve the same value x Note : I don't want to use local storage. Session storage & document storage do not seem to work. 回答1: Assuming you are using add-in commands, and a single "functions.js" file to drive the actions, I don't see why you couldn't store a global variable (or some localized version thereof) within functions.js to keep and pass around

How to correctly check the host: Office, Office online and web browser

空扰寡人 提交于 2019-12-11 06:14:50
问题 I need to detect whether a user has hit the URL of my add-in from a browser, outside of Office and Office online. (I've seen questions here about detecting whether it is Excel, or Excel online, but not neither of them.) I've looked at the utility functions OfficeHelpers.Utilities.host and OfficeHelpers.Utilities.isAddin but the code notes say these will only work after Office.initialize is called. If the URL has been navigated to from outside of an Office client then this won't be the case (?

Select no longer highlighting text on iPad (word)

你。 提交于 2019-12-11 06:14:04
问题 In my add-in we navigate the document by calling select on either a paragraph or a search result from inside a paragraph. In the newest version of Word for iOS : 2.0.2 (170415) the document is scrolling to the correct part of the document but the text is no longer highlighting. This was working in the previous released version of word. Oddly the text does highlight as expected if i open the search bar, and then navigate around my document. public SelectTextInstance(text: string,

Word Online Add-In: Using objects across multiple contexts

前提是你 提交于 2019-12-11 06:07:58
问题 I'm attempting to make an add-in, whereby a paragraph is split into sentences and then spoken, with the sentences being highlighted as they are read. For the most part, I have this working but the issue comes when I want to highlight the sentences currently being read. I have a function which splits the paragraph into sentences, based on where the users cursor is: function selectionTest() { Word.run(function (context) { originalRange = context.document.getSelection(); var paragraphs =

ScreenUpdating Office-js taskpane

≡放荡痞女 提交于 2019-12-11 06:07:50
问题 While developing a new taskpane addin we push a large two dementional object ot the excel workbook and format some rows based on another object. While doing this the user can see his excel workbook flickering. With the old com api there was a salution by turning off the screen updateing property. ScreenUpdating MSDN is there something like this in office-js for excel? 回答1: Office-js doesn't have an API to turning off screen updating. The flickering you mentioned is probably the control going

Is there any best practice how to detect a first run of the app?

为君一笑 提交于 2019-12-11 05:59:51
问题 Is there an easy and smooth way how to detect if an app is run the first time? I know, it would be possible to set a cookie and check if it exists but is there another - maybe even better - way? 回答1: I take it that you mean first time on a given computer, as distinct from first time in a given document or first time by a given user. In that case, the cookie, or local storage, is probably your easiest/smoothest strategy. If your add-in is going to have a server-side storage of purchasers