Skip to content

Instantly share code, notes, and snippets.

View hjkim-MSFT's full-sized avatar

Hoe Jin Kim - MSFT hjkim-MSFT

  • Microsoft
View GitHub Profile
@hjkim-MSFT
hjkim-MSFT / Refresh Formulas (1).EXCEL.yaml
Created June 12, 2019 23:05
Refreshes all formulas by setting the formula properties
name: Refresh Formulas (1)
description: Refreshes all formulas by setting the formula properties
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Excel.run(async (context) => {
@hjkim-MSFT
hjkim-MSFT / Worksheet calculate event.EXCEL.yaml
Created July 29, 2019 18:59
Registers event handlers that run when the worksheet is recalculated.
name: Worksheet calculate event
description: Registers event handlers that run when the worksheet is recalculated.
host: EXCEL
api_set: {}
script:
content: >
$("#register-onCalculated-handler").click(() =>
tryCatch(registerOnCalculatedHandler));
@hjkim-MSFT
hjkim-MSFT / Blank snippet.WORD.yaml
Last active December 4, 2019 21:56
Get body contents in ooxml form and insert back by using body.insertOoxml() api
name: Blank snippet
description: Create a new snippet from a blank template.
host: WORD
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
await Word.run(async (context) => {
@hjkim-MSFT
hjkim-MSFT / body.insertOoxml().WORD.yaml
Created December 4, 2019 22:02
Get body contents in ooxml form and insert back by using body.insertOoxml() api
name: body.insertOoxml()
description: >-
Get body contents in ooxml form and insert back by using body.insertOoxml()
api
host: WORD
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
@hjkim-MSFT
hjkim-MSFT / Blank snippet (2).WORD.yaml
Created May 13, 2020 00:11
Create a new snippet from a blank template.
name: Blank snippet (2)
description: Create a new snippet from a blank template.
host: WORD
api_set: {}
script:
content: >-
$("#run").click(() => tryCatch(run));
var myHtml = '<div style="padding-left:2em; text-indent:-2em;">Lorem ipsum
@hjkim-MSFT
hjkim-MSFT / insertHtml issue.WORD.yaml
Created May 13, 2020 00:15
Create a new snippet from a blank template.
name: insertHtml issue
description: Create a new snippet from a blank template.
host: WORD
api_set: {}
script:
content: >-
$("#run").click(() => tryCatch(run));
var myHtml = '<div style="padding-left:2em; text-indent:-2em;">Lorem ipsum
@hjkim-MSFT
hjkim-MSFT / Replace cc content with sectPr issue - workaround.WORD.yaml
Created June 17, 2020 20:50
A workaround for the issue that when importing content having sectPr in a cc already having a sectPr, the original sectPr does not get replaced
name: Replace cc content with sectPr issue - workaround
description: >-
A workaround for the issue that when importing content having sectPr in a cc
already having a sectPr, the original sectPr does not get replaced
host: WORD
api_set: {}
script:
content: >
$("#setup").click(() => tryCatch(setup));
@hjkim-MSFT
hjkim-MSFT / Replace cc content with table issue - Workaround.WORD.yaml
Created June 17, 2020 21:18
Workaround for the issue that Word inserts an undesirable paragraph when replacing a content control content with a table.
name: Replace cc content with table issue - Workaround
description: >-
Workaround for the issue that Word inserts an undesirable paragraph when
replacing a content control content with a table.
host: WORD
api_set: {}
script:
content: >
$("#clear").click(() => tryCatch(clear));
@hjkim-MSFT
hjkim-MSFT / Replace cc content with table issue - Workaround 2.WORD.yaml
Created June 17, 2020 21:42
Workaround 2 for the issue that Word inserts an undesirable paragraph when replacing a content control content with a table.
name: Replace cc content with table issue - Workaround 2
description: >-
Workaround 2 for the issue that Word inserts an undesirable paragraph when
replacing a content control content with a table.
host: WORD
api_set: {}
script:
content: >
$("#clear").click(() => tryCatch(clear));
name: 'Search with ?{255} chunk'
description: ''
host: WORD
api_set: {}
script:
content: >
$("#row1Button").click(() => tryCatch(row1ButtonRun));
$("#row2Button").click(() => tryCatch(row2ButtonRun));