Office Add-ins Documentation

repository·main·Indexed 19 days ago

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

Source documentation for Office Add-ins, featuring conceptual guides, tutorials, and quick starts for the Office JavaScript API. It covers topics such as unified manifests, extending web apps via Personal Tabs, Message Extensions, and the Office Add-ins runtime security architecture across Windows and macOS.

Tokens
272.7K
Snippets
471
Records
984
Agent score
66%

What's inside office-js-docs-pr

  1. Overview of Excel Add-ins

    main
    Excel add-ins allow you to automate workbook tasks, connect data to external services, add custom calculations, and provide web-based user experiences. Unlike COM or VSTO add-ins which are Windows-only, Excel add-ins are cross-platform, running on Excel on the web, Windows, Mac, and iPad. They are built using standard web technologies (HTML, CSS, JavaScript) and do not require local installation on a user's device.
  2. Localize your Office Add-in for multiple languages

    main

    To deliver a native-feeling experience in multiple regions, you can localize display strings, manifest metadata (names, descriptions, icons), and page content. The Office Add-ins platform supports three complementary approaches:

    1. Office JavaScript API: Detect the user's display or content locale at runtime to show the correct strings.
    2. Manifest overrides: Declare locale-specific names, descriptions, icons, and source pages in the manifest so the platform selects the correct values automatically.
    3. Visual Studio/.NET globalization: Use ASP.NET AJAX resource files and JavaScript Date and Number extensions for culture-aware formatting.
  3. Explore the structure of a React Excel add-in project

    main

    A standard React-based Excel add-in project generated via Yeoman contains these key files:

    • manifest.xml or manifest.json: Located in the root directory; defines the add-in's settings, permissions, and capabilities.
    • src/taskpane/taskpane.html: The HTML framework for the task pane.
    • src/taskpane/components/: Contains the React components that define the task pane UI.
    • src/taskpane/taskpane.css: Contains the CSS styles for the task pane.
    • src/taskpane/components/App.tsx: The primary file containing the Office JavaScript API code used to interact with Excel.
  4. Explore the OneNote add-in project structure

    main

    A standard Yeoman-generated OneNote task pane project includes these key files:

    • ./manifest.xml: Defines the add-in's settings, permissions, and capabilities.
    • ./src/taskpane/taskpane.html: The HTML markup for the task pane UI.
    • ./src/taskpane/taskpane.css: The CSS styles for the task pane.
    • ./src/taskpane/taskpane.js: The core logic using the Office JavaScript API to interact with OneNote.
  5. Design add-ins for Outlook on mobile devices

    main

    Guidelines for creating Outlook add-ins for Android and iOS. The goal is to create add-ins that feel native to each platform while maintaining brand consistency.

    Key components of a mobile add-in include:

    • Branding area
    • Navigation bar
    • Section title
    • Cells or input fields
    • Actions

    Note: The general Office Add-in design principles apply in addition to these mobile-specific patterns.

  6. Explore the Outlook add-in project structure

    main

    A project generated with the Yeoman generator for the unified manifest includes these key files:

    • ./manifest/manifest.json: Defines the settings and capabilities of the add-in.
    • ./src/taskpane/taskpane.html: Contains the HTML markup for the task pane UI.
    • ./src/taskpane/taskpane.css: Contains the CSS for the task pane.
    • ./src/taskpane/taskpane.ts: Contains the TypeScript code that uses the Office JavaScript library to interact with Outlook.
    • ./src/command/command.html: A template file edited by WebPack at build time to load the command's JavaScript.
    • ./src/command/command.ts: Contains the logic for custom ribbon buttons (commands).
  7. Outlook add-ins overview

    main

    Outlook add-ins are web-based solutions that extend the functionality of the Outlook client. They consist of a manifest (describing integration points like buttons, task panes, or events) and JavaScript/HTML code (providing the UI and business logic).

    Key characteristics:

    • Cross-platform: The same logic works across Web (Microsoft 365, Outlook.com), Desktop (New Outlook on Windows, Classic Outlook on Windows, Mac), and Mobile (iOS, Android).
    • Sandboxed: Web components run in a browser or webview control sandbox.
    • Network dependent: They require a network connection to run.
    • Deployment: Can be acquired via the Microsoft Marketplace or sideloaded for testing.
  8. Explore the structure of an Angular Excel add-in project

    main

    A project generated with the Angular template contains several key files:

    • manifest.xml: Located in the root directory, this file defines the add-in's settings, permissions, and capabilities.
    • ./src/taskpane/app/app.component.html: Contains the HTML markup for the task pane UI.
    • ./src/taskpane/taskpane.css: Contains the CSS styles applied to the task pane.
    • ./src/taskpane/app/app.component.ts: Contains the TypeScript code and Office JavaScript API calls used to interact with Excel.
  9. Prepend or append content to a message or appointment body on send

    main

    The prepend-on-send and append-on-send features allow Outlook add-ins to automatically insert content (such as sensitivity labels, legal disclaimers, or marketing headers) into the body of a message or appointment when the user sends the item.

    Requirement Sets

  10. Access Office Add-ins documentation

    main

    This repository contains the source files for Office JavaScript API concepts, quick starts, tutorials, and how-to guides.

    For the best reading experience, view the hosted documentation on Microsoft Learn.

    Note: If you are looking for the actual Office JavaScript API reference documentation (the technical specifications of the API methods, properties, and types), those source files are located in a separate repository: office-js-docs-reference.

  11. Explore UX design pattern categories

    main

    UX design patterns for Office Add-ins are organized into functional groups based on common user experiences. You can browse these categories to find best-practice solutions for specific add-in workflows:

    • First-run experience (FRE): Patterns for onboarding new users.
    • Authentication: Patterns for handling user sign-in and identity.
    • Navigation: Patterns for moving through your add-in's interface.
    • Branding Design: Patterns for balancing Microsoft brand elements with your own brand identity.

    Note: Example screens in the design pattern documentation are designed for a resolution of 1366x768.

  12. Choose a deployment method for Office Add-ins

    main

    Deployment methods for Office Add-ins depend on whether you are testing during development or distributing to end users, and whether you are using a standard manifest or the add-in only manifest.

    Primary Publication Methods

    These methods work regardless of the manifest type:

    • Sideloading: Used during development to test add-ins on Windows, iPad, Mac, or in a browser. This is not for production.
    • Microsoft Marketplace: Used for public distribution to all users via Microsoft's online app store.
    • Integrated apps portal (Microsoft 365 admin center): Used to distribute add-ins to users within your specific organization. This allows administrators to deploy internal add-ins or those from ISVs.

    Methods for Add-in Only Manifests

    If you are using the add-in only manifest, you have additional options:

    • Network share: For testing on Windows computers (not for production, Outlook, iPad, Mac, or web).
    • SharePoint app catalog: For on-premises environments (not for Outlook, Mac, or add-ins using <VersionOverrides>).
    • Exchange server: For distributing Outlook add-ins in on-premises or online environments (not for other Office apps).
    • Centralized Deployment: For distributing add-ins to users in your organization (alternative for sovereign/government clouds).