Skip to content

Instantly share code, notes, and snippets.

View JuaneloJuanelo's full-sized avatar

Juan Balmori JuaneloJuanelo

View GitHub Profile
name: Delay Deliver
description: ''
host: OUTLOOK
api_set: {}
script:
content: |
$("#delay").click(delay);
function multiselect() {
Office.context.mailbox.getSelectedItemsAsync(function(result) {
name: Delay Deliver
description: ''
host: OUTLOOK
api_set: {}
script:
content: |
$("#delay").click(delay);
function multiselect() {
@JuaneloJuanelo
JuaneloJuanelo / Multiselect.OUTLOOK.yaml
Created March 1, 2023 16:09
Prepends and Multiselect Samples
name: Multiselect
description: Prepends and Multiselect Samples
host: OUTLOOK
api_set: {}
script:
content: |
$("#prepend-on-send").click(prependOnSend);
$("#multiSelect").click(multiselect);
function prependOnSend() {
@JuaneloJuanelo
JuaneloJuanelo / Manipulate attachments (Item Compose) (1).OUTLOOK.yaml
Created February 9, 2023 15:29
Adds, gets, and removes attachments from a message or an appointment in Compose mode.
name: Manipulate attachments (Item Compose) (1)
description: >-
Adds, gets, and removes attachments from a message or an appointment in
Compose mode.
host: OUTLOOK
api_set: {}
script:
content: |
$("#add").click(add);
$("#addItemAttachment").click(addItemAttachment);
@JuaneloJuanelo
JuaneloJuanelo / Basic API call (JavaScript) (1).EXCEL.yaml
Created December 9, 2022 20:17
Performs a basic Excel API call using plain JavaScript & Promises.
name: Basic API call (JavaScript) (1)
description: Performs a basic Excel API call using plain JavaScript & Promises.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
function run() {
Office.context.document.bindings.addFromPromptAsync(Office.BindingType.Matrix,{},function(result){
@JuaneloJuanelo
JuaneloJuanelo / StylesOOXML.WORD.yaml
Last active August 31, 2022 21:50
how to create styles using OOXML
name: StylesOOXML
description: how to create styles using OOXML
host: WORD
api_set: {}
script:
content: |
$("#getO").click(() => tryCatch(getOoxml));
$("#get1").click(() => tryCatch(loadOoxml));
$("#setO").click(() => tryCatch(setOoxml));
$("#styleIn").click(() => tryCatch(insertWithStyle));
@JuaneloJuanelo
JuaneloJuanelo / Work with item custom properties.OUTLOOK.yaml
Created August 29, 2022 22:28
Gets the custom properties that the add-in placed on the current item, sets a new one, gets it, removes it, and saves all custom properties back to the item.
name: Work with item custom properties
description: >-
Gets the custom properties that the add-in placed on the current item, sets a
new one, gets it, removes it, and saves all custom properties back to the
item.
host: OUTLOOK
api_set: {}
script:
content: |
let customProps;
@JuaneloJuanelo
JuaneloJuanelo / Get a message using EWS.OUTLOOK.yaml
Created August 11, 2022 21:05
Gets a message using EWS without any back-end code.
name: Get a message using EWS
description: Gets a message using EWS without any back-end code.
host: OUTLOOK
api_set: {}
script:
content: |
$("#run").click(run);
function run() {
const ewsId = Office.context.mailbox.item.itemId;
@JuaneloJuanelo
JuaneloJuanelo / Blank snippet (6).OUTLOOK.yaml
Created August 10, 2022 18:32
Create a new snippet from a blank template.
name: Blank snippet (6)
description: Create a new snippet from a blank template.
host: OUTLOOK
api_set: {}
script:
content: |-
$("#run").click(run);
function run() {
Office.context.mailbox.item.addHandlerAsync(Office.EventType.RecipientsChanged,handler,function(result){
@JuaneloJuanelo
JuaneloJuanelo / Work with client signatures (Compose).OUTLOOK.yaml
Created August 3, 2022 21:12
Check if the client signature is enabled, disable the client signature, get the compose type, and set a signature in Compose mode.
name: Work with client signatures (Compose)
description: >-
Check if the client signature is enabled, disable the client signature, get
the compose type, and set a signature in Compose mode.
host: OUTLOOK
api_set: {}
script:
content: |
$("#isClientSignatureEnabled").click(isClientSignatureEnabled);
$("#disableClientSignature").click(disableClientSignature);