Share via

Word Addin function - insertFileFromBase64 not working post September 22 updates

Anonymous
2022-10-07T11:45:15+00:00

Hi Team,

We have developed a word Addin to configure the templates. This Addin has capability to edit already existing templates by pulling them from repository and rendering them on MS word and to do so we are passing the byte stream to insertFileFromBase64(myBase64, "replace") to get the template document rendered.

Error: {"description":"InvalidArgument","name":"RichApi.Error","code":"InvalidArgument","traceMessages":[],"innerError":null,"debugInfo":{"code":"InvalidArgument","message":"InvalidArgument","errorLocation":"Range.insertFileFromBase64"},"httpStatusCode":400,"stack":"InvalidArgument: InvalidArgument\n at Anonymous function (https://appsforoffice.microsoft.com/lib/1/hosted/word-win32-16.01.js:25:307762)\n at Anonymous function (https://appsforoffice.microsoft.com/lib/1/hosted/word-win32-16.01.js:25:236859)\n at I (https://appsforoffice.microsoft.com/lib/1/hosted/word-win32-16.01.js:25:236835)\n at D (https://appsforoffice.microsoft.com/lib/1/hosted/word-win32-16.01.js:25:236708)\n at h (https://appsforoffice.microsoft.com/lib/1/hosted/word-win32-16.01.js:25:235204)"}

This Addin was working fine and the error started popping up recently after September 22 updates.

Regards,

Dheeraj Jindal

Microsoft 365 and Office | Word | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2022-10-08T06:56:22+00:00

    Are you talking about dotx or dotm templates?

    If so, why don't you use Documents.Open to open the template and have code make whatever modifications are required to it?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-10-12T15:26:29+00:00

    Hi Doug,

    No these are not dotx or dotm templates, these are documents which can be modified using addin.

    Regards,

    Dheeraj Jindal

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-10-11T03:16:02+00:00

    Hi Albert,

    Addin works in office 365 though it facing issue in Word 16 Standard version. In safe mode, we don't have option to load the addin.

    Regards,

    Dheeraj Jindal

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2022-10-07T14:02:22+00:00

    Hello Dheeraj,

    Thanks for reaching out here regarding this query.

    It seems that the Add-in itself isn't compatible with the recent update you installed in September.

    Is this Add-in applicable in Word online?

    Does the Add-in work in Word's Safe Mode, normally?

    I will be able to use the relevant feedback information you provide to better see how I can help you with the experience you're having. Thank you!

    Warm regards, Albert

    Was this answer helpful?

    0 comments No comments