Office.JS “This add-in is no longer available” error when creating a Word Document with context.application.createDocument() RRS feed

  • Question

  • I'm developing an add-in for Microsoft Word 2016 using office js version 16.0.8626.1000 

    https*// (replace * with :)

    I use a web service to retrieve a document in base64 format and then I create a new Word instance with that.

    The problem is that whenever I run the add-in from my server (not from visual studio debugger) it opens the document but the add-in frame displays an error

    First Instance:

    https*// (replace * with :)

    Second instance:

    https*// (replace * with :)

    This doesn't happen if I run the add-in from visual studio debugger, it opens the new instance without the frame.

    This is my code:

    Office.initialize = function (reason) {
        // Checks for the DOM to load using the jQuery ready function.
        $(document).ready(function () {
            $('#get').click(function () {

    This how I retrieve the document (without real url):

    function openWord() {
        getDocumentAsBase64(function (data) {
   (context) {
                var myNewDoc = context.application.createDocument(data);
                return context.sync()
                    .then(function () {
                    .catch(function (myError) {
                        //otherwise we handle the exception here!
            }).catch(function (myError) {
    function getDocumentAsBase64(callback) {
            url: '',
            data: "{}",
            dataType: "json",
            type: "POST",
            contentType: "application/json; charset=utf-8",
            success: function (response) {
            error: function (response) {

    This is the manifest (https*// - replace * with :) that I'm currently using if anyone wants to replicate the problem with Office 2016

    Monday, December 18, 2017 12:53 PM

All replies

  • Hi Diego Silvera de Souza,

    I try to find the reason but I did not get any cause for the issue.

    looks like issue is little complex.

    I will try to involve some senior engineer to look in to this issue.

    he will try to provide further suggestions to solve this issue.

    Thanks for your understanding.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, December 19, 2017 9:30 AM
  • Hi Deepak Saradkumar Panchal,

    thank you for your response.

    Indeed I found myself very confused when this problem appeared.

    I could use some help from any specialist in this kind of technology because in my company we are developing a project with office js.

    If there is any news don't hesitate to comment here.



    Tuesday, December 19, 2017 12:09 PM

  • Finally I found the solution to this problem.

    1. First I downloaded Office 2016 Administrative Template Files (https*// - replace * with :). When you run it, it will extract a bunch of files and folders.
    2. Enter admx folder and copy the whole content to C:\Windows\PolicyDefinitions.
    3. Do a gpupdate /force under CMD (or Powershell) as an administrator.
    4. Run gpedit.msc and find the Administrative Template for Office 2016 then Updates (PC configuration >> Administrative Template >> Microsoft Office 2016 >> Updates >> Update Channel) and set the Update Channel to Montly Channel.

    I'm on Version 1711 (compilation 8730.2127 click and run) and everything is working good now.

    EDIT 9/1/2018:
    The error started showing up again. The only thing I did was attaching the runtime logging to debug my add-in manifest. This is still unsolved.
    Friday, January 5, 2018 4:55 PM
  • Hi Diego

    Try asking this on StackOverflow, where the 'Softies who develop the technology hang out:

    Cindy Meister, Office Developer/Word MVP, <a href=""> my blog</a>

    Thursday, January 11, 2018 4:22 PM
  • Hi Cindy!

    My question regard this topic is on Stack Overflow too


    Unfortunately I couldn't find a similar case nor a solution (or cause to this behaviour).

    Thanks for the sugestion anyway.


    Thursday, January 18, 2018 12:45 PM