This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: html with image | |
description: 'Inserts, updates, and retrieves content controls.' | |
host: WORD | |
api_set: {} | |
script: | |
content: >- | |
$("#insert").click(() => tryCatch(insertPreHtml)); | |
async function insertPreHtml() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: close | |
description: Create a new snippet from a blank template. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
async function run() { | |
await Excel.run(async (context) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview API testing | |
description: Formats text with pre-built styles. | |
host: WORD | |
api_set: {} | |
script: | |
content: | | |
$("#add-preset").click(() => tryCatch(addPreStyledFormattedText)); | |
async function addPreStyledFormattedText() { | |
await Word.run(async (context) => { | |
const fields = context.document.getSelection().insertField("Start", Word.FieldType.author); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TableBinding | |
description: Performs a basic Word API call using TypeScript. | |
host: WORD | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(insertTable)); | |
$("#run2").click(() => tryCatch(addBinding)); | |
async function insertTable() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: DocumentCustomXmlPart | |
description: Create a new snippet from a blank template. | |
host: WORD | |
api_set: {} | |
script: | |
content: | | |
$("#run").click(() => tryCatch(run)); | |
$("#run2").click(() => tryCatch(run2)); | |
$("#run3").click(() => tryCatch(run3)); | |
$("#run4").click(() => tryCatch(run4)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: InsertFileFromBase64 (1) | |
description: Performs a basic Word API call using TypeScript. | |
host: WORD | |
api_set: {} | |
script: | |
content: | | |
$("#file").change(getBase64); | |
$("#insert-sheets").click(() => tryCatch(createDocument)); | |
let externalDoc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Perf testing gist for Field API | |
description: This sample shows how to get existing fields. | |
host: WORD | |
api_set: {} | |
script: | |
content: | | |
$("#get-all").click(() => tryCatch(getAllFields)); | |
$("#get-all-code").click(() => tryCatch(getAllFieldsCode)); | |
$("#get-all-result").click(() => tryCatch(getAllFieldsResult)); | |
$("#setup").click(() => tryCatch(setup)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: InsertFileFromBase64 | |
description: Performs a basic Word API call using TypeScript. | |
host: WORD | |
api_set: {} | |
script: | |
content: | | |
$("#file").change(getBase64); | |
$("#insert-sheets").click(() => tryCatch(insertDocument)); | |
let externalDoc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Style Custom Function -No Enums (1) | |
description: Custom function that return a Style data type. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: > | |
// Azure Functions endpoint | |
//const endpoint = "http://localhost:7071"; // Local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Style Custom Function -No Enums | |
description: Custom function that return a Style data type. | |
host: EXCEL | |
api_set: {} | |
script: | |
content: > | |
// Azure Functions endpoint | |
//const endpoint = "http://localhost:7071"; // Local |