Does the Office.js API support multiple range selection?

后端 未结 2 1608
不知归路
不知归路 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...

提交回复
热议问题