Does the Office.js API support multiple range selection?

后端 未结 2 1610
不知归路
不知归路 2021-01-27 17:42

I need to select multiple ranges simultaneously via the Office.js API like you can do in the MSWord UI by holding down the CTRL key and highlight multiple non-contiguous paragra

相关标签:
2条回答
  • 2021-01-27 18:34

    No, none of the APIs support multiple selections. Even the ability for the user to do so, using Ctrl+select is relatively new. The capability was never carried over to the APIs.

    The closest the APIs can do is to highlight (or otherwise format) the Range objects of interest. There is such functionality in Word's dialog box which is also available to the COM APIs, but I don't find an equivalent for the JS APIs...

    0 讨论(0)
  • 2021-01-27 18:37

    To confirm what Cindy mentioned, Non-continuous selections are not only not supported in Office.js (for Word, we DO support them for Excel though) but also not supported manually on other platforms (i.e. Word Online).

    0 讨论(0)
提交回复
热议问题