Add ability to collapse selection
Could you add a call to the Office API to collapse the selection? e.g. removeSelectionasync()
Our Eduction Task Pane apps work based on selections and we would like the ability to collapse the selection once the functionality we introduce has been completed.
At present our task pane apps target Word 2013 and Excel online, though we are coming from Word Object Model desktop type applications, so making the cross over.
Gavan, thank you for your feedback. We really appreciate it! Can you please explain your scenario a little bit? We now have a getRange API using which you can get the range of an object (paragraph.getRange(“start”), at the start or the end of it, and then it can be selected. Does this API help with your scenario? We look forward to hearing back from you.
Office Extensibility Team
Gavan Convery commented
Please see below for the scenario:
Install this Task Pane App on Word 2016:
Now once installed
1) select some text
2) click on the pink color to highlight
3) result: the selection remains but the color of the text beneath the selection is now pink
4) however the selection color is now green, so the user is unsure that the pink highlight has been successfully applied.
1) After the highlight has been made to the text (e.g. pink highlight), the selection should be removed programmatically
2) End result, the user can see the pink highlight in the document and knows that their action has been a success.
Let me know if you need further clarification.