Skip to content

Instantly share code, notes, and snippets.

View Stan370's full-sized avatar

Stan_k Stan370

View GitHub Profile
@Stan370
Stan370 / gist:11fc7f197102d1bce51ef57321a120c4
Created February 21, 2025 05:53
Word Formatting Checker that allows users check the formatting of the first three words.You can adapt it to check additional properties (e.g., font color, italics) or extend it to handle more complex scenarios.
name: Basic API call (JavaScript)
description: Performs a basic Word API call using plain JavaScript & Promises.
host: WORD
api_set: {}
script:
content: >
document.getElementById("checkFormatting").addEventListener("click", async
function() {
await Word.run(async (context) => {
const paragraph = context.document.body.paragraphs.getFirst();