Office JavaScript API Reference

repository·main·Indexed 41 days ago

https://github.com/officedev/office-js-docs-reference

Reference documentation for the Office JavaScript API used to build add-ins and extensions for Microsoft Office applications. Includes Common APIs and host-specific APIs for Excel, Word, Outlook, PowerPoint, OneNote, Visio, and Project, organized by versioned requirement sets.

Tokens
237.7K
Snippets
492
Records
1.3K
Agent score
98%

What's inside Office.js

  1. Overview of the documentation generation stages

    main

    The generation pipeline follows these sequential stages:

    1. Preprocess definitions: Downloads/reads .d.ts files, extracts host sections, and prepares inputs for API Extractor.
    2. Generate requirement-set definitions: Uses version-remover to create specific API versions and whats-new to generate comparison tables.
    3. Run API Extractor: Converts .d.ts inputs into API model JSON files.
    4. Prepare JSON and snippets: Repairs canonical references, cleans enums, and merges Script Lab/local snippets.
    5. Run API Documenter: Converts API model JSON into DocFX YAML.
    6. Apply Office-specific YAML enhancements: Inserts snippets, converts annotations to links, and builds "Used by" sections.
    7. Generate Outlook item object model tables: Creates specific Markdown include files for Outlook properties, methods, and events.
    8. Assemble publishing output: Moves YAML to docs/docs-ref-autogen/, combines TOCs, and normalizes formatting.
    9. Update requirement-set page dates: Updates ms.date based on changes in include files.
    10. Validate reference coverage: Runs reference-coverage-tester to check for missing links or incomplete coverage.
  2. New features in Outlook Mailbox requirement set 1.11

    main

    Mailbox requirement set 1.11 builds upon requirement set 1.10 and introduces new event-based activation events and SessionData APIs.

    New Event-based Activation Events

    The following events can be used for event-based activation in Outlook add-ins:

    • OnAppointmentAttachmentsChanged
    • OnAppointmentAttendeesChanged
    • OnAppointmentRecurrenceChanged
    • OnAppointmentTimeChanged
    • OnInfoBarDismissClicked
    • OnMessageAttachmentsChanged
    • OnMessageRecipientsChanged

    SessionData APIs

    Requirement set 1.11 also adds support for SessionData APIs.

  3. New features in Outlook requirement set 1.7

    main

    Mailbox requirement set 1.7 expands the Outlook add-in API with capabilities for managing recurring appointments and monitoring item changes. Key additions include:

    • Recurrence Management: Get or set the recurrence pattern for appointments and meeting requests. Includes methods to manage start and end dates/times for recurring series.
    • Series Identification: Retrieve the ID of the series that a specific appointment instance belongs to.
    • Compose Mode Metadata: Access the organizer value of an appointment or the sender (From value) of a message while in compose mode.
    • Event Handling: New methods to add and remove event handlers for supported events on items, and new events triggered by changes to recurrence, recipients, or appointment times.
  4. What's new in Outlook add-in API requirement set 1.2

    main

    Mailbox requirement set 1.2 builds upon requirement set 1.1 and introduces capabilities for interacting with the content of appointments and messages during composition.

    Key features include:

    • Data Extraction: Methods to retrieve selected data from the subject or body of an appointment or message currently being composed.
    • Data Insertion: Methods to insert data at the user's cursor position within the subject or body of an appointment or message being composed.
    • Attachments: A new property that allows including attachments in a message reply form.
  5. What's new in Outlook add-in API requirement set 1.6

    main

    Mailbox requirement set 1.6 builds upon requirement set 1.5 and introduces the following capabilities:

    • Contextual Add-in Data: New methods allow you to retrieve entities or regular expression matches from the user's selection that triggered a contextual add-in.
    • New Message Forms: A new method is available to open a new message form.
    • Account Type Detection: Support for determining the account type of the user's mailbox.
  6. What's new in Excel JavaScript API 1.12

    main

    Excel JavaScript API requirement set 1.12 introduces several new capabilities across multiple feature areas:

    • Dynamic Arrays & Range Spilling: New APIs allow add-ins to identify ranges associated with dynamic array results.
    • Formula Precedents: The Range.getDirectPrecedents() method allows you to find the specific ranges used to evaluate a cell's formula.
    • PivotTable Filtering: Added support for applying value-driven filters to PivotField objects using PivotFilters.
    • Worksheet-level Custom Properties: Custom properties can now be scoped to a specific Worksheet in addition to the standard workbook-level scope.
    • Comment Events: The CommentCollection now supports events for adding, changing, and deleting comments.
    • Culture Settings: Enhanced access to cultural settings for date and time formatting via CultureInfo and NumberFormatInfo on the Application object.