Skip to content

Instantly share code, notes, and snippets.

@AbidRahman-MSFT
AbidRahman-MSFT / Get and Set metadata from inline picture
Last active May 11, 2021 23:35
Get and Set metadata from inline picture
name: Use inline pictures
description: Inserts and gets inline pictures.
host: WORD
api_set: {}
script:
content: |
$("#insert").click(() => tryCatch(insertImage));
$("#get").click(() => tryCatch(getData));
var id;
@AbidRahman-MSFT
AbidRahman-MSFT / GetHtml of document body.WORD.yaml
Created May 26, 2021 17:51
get and print the html of the document body
name: GetHtml of document body
description: get and print the html of the document body
host: WORD
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Word.run(async function(context) {
@AbidRahman-MSFT
AbidRahman-MSFT / Add change text event handler to CC.WORD.yaml
Created July 28, 2021 20:06
Adds a binding to a content control and registers the BindingDataChanged event type.
name: Add change text event handler to CC
description: >-
Adds a binding to a content control and registers the BindingDataChanged event
type.
host: WORD
api_set: {}
script:
content: |+
$("#run").click(() => tryCatch(run));