Skip to content

Instantly share code, notes, and snippets.

@rajeshthakur1976
rajeshthakur1976 / Get selected text (Compose).OUTLOOK.yaml
Created January 25, 2024 05:11
Gets the selected text in the item body or subject in Compose mode.
name: Get selected text (Compose)
description: Gets the selected text in the item body or subject in Compose mode.
host: OUTLOOK
api_set: {}
script:
content: |
$("#get-selected-data").click(getSelectedData);
function getSelectedData() {
Office.context.mailbox.item.getSelectedDataAsync(Office.CoercionType.Text, function(asyncResult) {