Questions tagged [word-web-addins]

162 questions
6
votes
1 answer

Drag and Drop in Office JS page to Word Document

I am creating an online office add-in for the Word application. I have created an HTML page with some fields like, Name, Address, Mobile etc. On drag and drop of such a field I want to create a MergeField in Word Document. I have done R&D regarding…
5
votes
0 answers

How to open a document in 'current window' in office add-in instead of opening in a new window?

I'm working on Office 365 Word Add-in that opens a document. When we open the document via context.application.createDocument(base64string).open(), it launches a new window instead of opening the document in current browser tab (in case of web…
Baig
  • 1,489
  • 1
  • 25
  • 41
4
votes
0 answers

Word Web-Addin: getSliceAsync() only return First Slice of data

I am developing an office 365 word web addin, wherein I need to upload the currently opened document to my server. For which I am trying to get the file data using following code. The method getSliceAsync() is returning only first slice of data. On…
Asmi
  • 157
  • 1
  • 1
  • 14
3
votes
0 answers

Broken content control in Word document

In my office js app for Word, sometimes a content control looses connection, so I cannot see the content control any longer, and then the document is broken for inserting new content controls of that type. I am not able to delete the broken content…
3
votes
1 answer

MS Word JavaScript API - event handler for Content Controls

Is there a way to fire a function when clicking on a contentControl in Office-js? I am writing an add-on for MS Word, and I have inserted content controls, that will be associated with a list in my add-in. I need to fire a function when clicking on…
3
votes
2 answers

OfficeJs - How to display modal dialog

I am using OfficeJs to create word add-in. In that i want to show modal dialog on click on ribbon button. I have used below API Office.context.ui.displayDialogAsync(url, {height: 30, width: 20}); to display dialog but it is non-modal dialog. Is…
pooja
  • 159
  • 1
  • 13
3
votes
0 answers

retriving data from Content control using Word Api

I'm developing a Word Add-in (Word API + Office.js) where i am working with content controls, i am try to check whether control is blank i am using the below code for this functionality function callPromise() { return new Promise(function…
3
votes
1 answer

Deploy office (web) add-in with an installer

I started recently to build a office add-in (the web-based ones, not VSTO) and I would like in addition to have it in the office store (the preferred method of distribution) to also distribute the manifest through a setup file. Is this possible? I…
Luís Lopes
  • 453
  • 6
  • 15
2
votes
2 answers

Convert PDF to Docx using MS "Add In" Office.js SDK

The standard approach for Office automation has been to program against COM interfaces (e.g. Office Primary Interop Assembly), and this only works on a Windows OS. Instead, I am interested in using the new Office "Add In" technology, which replaces…
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
2
votes
1 answer

Not search the part that was previously searched Officejs

"I have something with me." Currently I am using context.document.body.search('something', { matchCase: true, matchWholeWord: true }).load('items/NoPropertiesNeeded'); to search 'something' and the 'something' gets loaded in the taskpane. "I have…
2
votes
0 answers

Is there a way to detect changes to the content control in word in office js?

I've got a script that finds all matching bits of text and puts them in a content control. I noticed there was a functionality to remove the content control if the text was edited ContentControl.removeWhenEdited = true. Is there a way to run this…
2
votes
1 answer

Taskpane Word Add-Ins (office-js) - The Search function return empty object {} in Word 365 online

I have created a Taskpane Word Add-Ins, written in React Typescript. This sideload add-in is going to search a list of words in Word document and replace them by new words. All functionality works well in desktop MS Word and find all the words. When…
Meisam Mofidi
  • 161
  • 1
  • 6
2
votes
1 answer

Is there any way in which on click of link/anchor tag it will redirect to some part of page/image in Word add-ins using office-js

open link for Demo image const [tableRow, setTableRow] = useState([["ID", "Image URL", "Photographer"]]) const insertTable = async (response) => { Word.run(async (context) => { const photographer = response.photographer; const img_id =…
2
votes
0 answers

Selecting a text in word-addin Officejs that comes right before a searched text

var foundItems = context.document.body.search('here', { matchCase: false, matchWholeWord: true }) If I have a paragraph saying, "I am stuck here.". I need to read the word that comes before the searched word, in this case it is "stuck". How can I…
2
votes
0 answers

Word web add-in works only after cleaning up the cache

I am working on word web add-in. There are two issues which I am always facing in non development environment. Sometimes word add-in displays blank screen in non-dev environments. Only after cleaning up the cache as mentioned in the below MS link,…
1
2 3
10 11