question

LourensGroenewald-1088 avatar image
0 Votes"
LourensGroenewald-1088 asked RaviKumar-4291 commented

office-js-dev Office.actions missing

Hi

When looking at the documentation when wanting to create shortcuts it is showing the below code

Office.actions.associate('SHOWTASKPANE', function () {
    return Office.addin.showAsTaskpane()
        .then(function () {
            return;
        })
        .catch(function (error) {
            return error.code;
        });
});

I am getting the following error:
Property 'actions' does not exist on type 'typeof Office'

was actions removed from the js library?

I cannot seem to get it working

office-js-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Try this works for me
npm install @types/office-js --save-dev

0 Votes 0 ·

1 Answer

ChrisDrake-5134 avatar image
0 Votes"
ChrisDrake-5134 answered

The taskpane is an HTML file that is loaded from your web server when the user clicks the taskpane button for your add-in.
You specify where that HTML file lives, and the icon for the button, inside your manifest.xml file.

Take a look at the Script Lab add-in for example.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.