none
word crashes when calling setDataAsync (JavaScript for Office) RRS feed

  • Question

  • This happens when saving a document. During the save Word crashes and recovers the document. There are no errors from the App it self. The crash only happens if you save from the File page in Word, not if you click ctrl+s or hit the save button when the document is visible.

    I can reproduce this every time.

    To reproduce, there are additional pre reqs.

    Office 2016 Norwegian.

    A Sharepoint 365 team site.

    An app that runs code one second after the saved status is updated. I have this app Attached to a template on the team site.

    Code extract

        Office.select('bindings#' + bindingName).setDataAsync(data, { coercionType: coercionTypeInternal }, function (asyncResult) {
            if (asyncResult.status == "failed" /*Office.AsyncResultStatus.Failed*/) {
                console.log(bindingName + ' Error: ' + asyncResult.error.message);
            }
            else {
                console.log(bindingName + ' Success: ' + data);
            }

        });

    This is my Office JS link

    <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>

    Wednesday, October 26, 2016 3:38 PM

All replies

  • Hi,

    I test in 16.0.6965.2092 EN-US/Win10, the method works fine.

    Do you have any VSTO add-ins customize the backstage view of Word? I suggest you disable all the add-ins.

    Besides, where do you check the saved status?  I suggest you try to repair the Office and test in English version.

    Regards,

    Celeste


    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 MSDNFSF@microsoft.com.

    Friday, October 28, 2016 7:46 AM
    Moderator