InvalidArgument error when apply Indent in Word 2016 MSO(16.0.4738.1000)32-bit)
Bug Report
- Host: WORD 2016 MSO(16.0.4738.1000)32-bit)
- OS: Windows 10
- Browser: Word Add-Ins/IE 11.3321.14393.0 (Update Version 11.0.160)
- Environment: Test environment
Expected behavior:
The indent should be applied to the selected text/paragraph.
Actual behavior:
I am trying to use Script-Lab on Word 2016 MSO(16.0.4738.1000)32-bit) and facing an issue when I apply indent to selected text.
Steps to Reproduce:
- Open Word
- Go Insert menu, add Script-Lab add-in
- Search Indent in samples menu
- Enter some text and select the same
- Click "Indent first paragraph" under "Try it out" header
Failure Logs:
{ "description": "InvalidArgument", "message": "InvalidArgument", "name": "RichApi.Error", "code": "InvalidArgument", "traceMessages": [], "innerError": null, "debugInfo": { "code": "InvalidArgument", "message": "InvalidArgument", "errorLocation": "" }, "stack": "InvalidArgument: InvalidArgument\n at Anonymous function (https://appsforoffice.microsoft.com/lib/1/hosted/word-win32-16.01.js:24:288131)\n at o (https://script-lab-runner.azureedge.net/static/js/1.30a5fcfe.chunk.js:1:2779072)\n at Anonymous function (https://script-lab-runner.azureedge.net/static/js/1.30a5fcfe.chunk.js:1:2779219)\n at u (https://script-lab-runner.azureedge.net/static/js/1.30a5fcfe.chunk.js:1:314565)" }
Screenshot:

Hi @ankushsolao,
The build of Word you're on only supports the WordApi 1.1 requirement set. That sample in Script Lab uses ParagraphCollection.getFirst, which was introduced in WordApi 1.3. If you want to see the only Office JavaScript APIs supported by this requirement set, use this link to see the properly versioned reference documentation.
There might be a different issue this uncovers in Script Lab. I think you're supposed to only be able to see samples that are supported in your current environment. Tagging @Zlatkovsky to help answer this question.
I don't see any code that filters the samples by current environment.