Skip to content

Instantly share code, notes, and snippets.

@Faibbus
Faibbus / read-and-write-from-document-settings.yaml
Created June 4, 2026 14:26
Script Lab code to read and write from document settings
name: Read and write from document settings
description: >-
Small Office.js sample for reading and writing
Office.context.document.settings.
host: POWERPOINT
api_set: {}
script:
content: |
Office.onReady(() => {
document.getElementById("writeButton").addEventListener("click", writeSetting);
@Faibbus
Faibbus / context-sync-triggers-autosave.yaml
Last active June 3, 2026 14:14
Read-only context.sync in a loop (setInterval)
name: Read-only context.sync in a loop
description: ''
host: POWERPOINT
api_set: {}
script:
content: >
Office.onReady(() =>
document.getElementById("run").addEventListener("click", async () => {
console.log("launch one loop");
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
namespace ColorPicker
{
/// <summary>