Metadata and Custom Data
Witan exposes deck metadata through the Office.js PowerPoint object model.
Document properties
const props = context.presentation.properties;
props.title = "Quarterly Review";
props.author = "Witan";
props.subject = "Operating metrics";
await context.sync();
return props.toJSON();
Supported properties include author, category, comments, company, creation date, custom properties, keywords, last author, manager, revision number, subject, and title.
Custom properties
const custom = context.presentation.properties.customProperties;
custom.add("source", "agent-workflow");
custom.add("reviewed", true);
Custom property values preserve primitive types where PowerPoint supports them.
Tags
Tags are string key/value pairs on presentations, slides, and shapes:
slide.tags.add("section", "financials");
shape.tags.add("data-source", "crm-export");
Custom XML parts
Use custom XML parts for structured metadata that should travel with the deck:
const part = context.presentation.customXmlParts.add(
'<witan xmlns="https://witanlabs.com/schema"><status>draft</status></witan>'
);
const xml = part.getXml();
await context.sync();
return xml.value;
Custom XML parts can also be scoped to shapes.
Bindings
Presentation bindings are backed by custom XML and can associate metadata with shapes or current selections.