-
Notifications
You must be signed in to change notification settings - Fork 266
[PowerPoint] (Overview) Add article about object model #5213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ElizabethSamuel-MSFT
wants to merge
3
commits into
main
Choose a base branch
from
eliz-ppt-om
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,42 @@ | ||||||
--- | ||||||
title: PowerPoint JavaScript object model in Office Add-ins | ||||||
description: Learn about the key components in the PowerPoint-specific JavaScript object model. | ||||||
ms.date: 06/05/2025 | ||||||
ms.topic: concept-article | ||||||
ms.localizationpriority: high | ||||||
--- | ||||||
|
||||||
# PowerPoint JavaScript object model in Office Add-ins | ||||||
|
||||||
This article describes concepts that are fundamental to using the [PowerPoint JavaScript API](../reference/overview/powerpoint-add-ins-reference-overview.md) to build add-ins. | ||||||
|
||||||
## Office.js APIs for PowerPoint | ||||||
|
||||||
A PowerPoint add-in interacts with objects in PowerPoint by using the Office JavaScript API. This includes two JavaScript object models: | ||||||
|
||||||
- **PowerPoint JavaScript API**: The [PowerPoint JavaScript API](/javascript/api/powerpoint) provides strongly-typed objects that work with the presentation, slides, tables, shapes, formatting, and more. To learn about the asynchronous nature of the PowerPoint APIs and how they work with the presentation, see [Using the application-specific API model](../develop/application-specific-api-model.md). | ||||||
|
||||||
- **Common APIs**: The [Common API](/javascript/api/office) give access to features such as UI, dialogs, and client settings that are common across multiple Office applications. To learn more about using the Common API, see [Common JavaScript API object model](../develop/office-javascript-api-object-model.md). | ||||||
|
||||||
While you'll likely use the PowerPoint JavaScript API to develop the majority of functionality in add-ins that target PowerPoint, you'll also use objects in the Common API. For example: | ||||||
|
||||||
- [Office.Context](/javascript/api/office/office.context): The `Context` object represents the runtime environment of the add-in and provides access to key objects of the API. It consists of presentation configuration details such as `contentLanguage` and `officeTheme` and also provides information about the add-in's runtime environment such as `host` and `platform`. Additionally, it provides the `requirements.isSetSupported()` method, which you can use to check whether a specified requirement set is supported by the PowerPoint application where the add-in is running. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- [Office.Document](/javascript/api/office/office.document): The `Office.Document` object provides the `getFileAsync()` method, which you can use to download the PowerPoint file where the add-in is running. It also provides the `getActiveViewAsync()` method, which you can use to check whether the presentation is in a "read" or "edit" view. "edit" corresponds to any of the views in which you can edit slides: Normal, Slide Sorter, or Outline View. "read" corresponds to either Slide Show or Reading View. | ||||||
|
||||||
## PowerPoint-specific object model | ||||||
|
||||||
To understand the PowerPoint APIs, you must understand how key components of a presentation are related to one another. | ||||||
|
||||||
- The presentation contains slides and presentation-level entities such as settings and custom XML parts. | ||||||
- A slide contains content like shapes, text, and tables. | ||||||
- A layout determines how a slide's content is organized and displayed. | ||||||
|
||||||
For the full set of objects supported by the PowerPoint JavaScript API, see [PowerPoint JavaScript API](/javascript/api/powerpoint). | ||||||
|
||||||
## See also | ||||||
|
||||||
- [PowerPoint JavaScript API overview](../reference/overview/powerpoint-add-ins-reference-overview.md) | ||||||
- [Build your first PowerPoint add-in](../quickstarts/powerpoint-quickstart-yo.md) | ||||||
- [PowerPoint add-in tutorial](../tutorials/powerpoint-tutorial-yo.md) | ||||||
- [PowerPoint JavaScript API reference](/javascript/api/powerpoint) | ||||||
- [Learn about the Microsoft 365 Developer Program](https://aka.ms/m365devprogram) |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why context and document are shown out of all the things in the Office namespace. Are they more important, or typically used compared to the others? Would be good to have something like "These objects are commonly used..."