This file contains hidden or 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: insert content controls | |
| description: Create a new snippet from a blank template. | |
| host: WORD | |
| api_set: {} | |
| script: | |
| content: | | |
| $("#run").click(run); | |
| async function run() { | |
| await Word.run(async (context) => { |
This file contains hidden or 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: Search | |
| description: Shows basic and advanced search capabilities. | |
| host: WORD | |
| api_set: {} | |
| script: | |
| content: | | |
| const createOoxmlComment = (id, comment) => { | |
| const ooxmlComment = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <?mso-application progid="Word.Document"?> | |
| <pkg:package |
This file contains hidden or 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: get ooxml | |
| description: Performs a basic Word API call using TypeScript. | |
| host: WORD | |
| api_set: {} | |
| script: | |
| content: | | |
| $("#run").click(() => tryCatch(run)); | |
| /** Default helper for invoking an action and handling errors. */ | |
| async function tryCatch(callback) { |
This file contains hidden or 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
| # Assume we are in your home directory | |
| cd ~/ | |
| # Clone the repo from GitLab using the `--mirror` option | |
| $ git clone --mirror [email protected]:mario/my-repo.git | |
| # Change into newly created repo directory | |
| $ cd ~/my-repo.git | |
| # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks. |
This file contains hidden or 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: 'Searching for @ and #' | |
| description: '' | |
| host: WORD | |
| api_set: {} | |
| script: | |
| content: | | |
| $("#run").click(() => tryCatch(run)); | |
| async function run() { | |
| await Word.run(async (context) => { |
This file contains hidden or 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: change cc controls | |
| 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(function(context) { |
This file contains hidden or 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: ContentControls | |
| description: '' | |
| host: WORD | |
| api_set: {} | |
| script: | |
| content: > | |
| Word.run(async (context) => { | |
| var doc = Office.context.document; | |
| doc.addHandlerAsync(Office.EventType.DocumentSelectionChanged, selectionChange); | |
| }); |
This file contains hidden or 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: Get bookmarks | |
| description: '' | |
| author: leoseccia | |
| host: WORD | |
| api_set: {} | |
| script: | |
| content: |- | |
| $("#run").click(() => tryCatch(run)); | |
| async function run() { |