Skip to content

Commit 15ecaeb

Browse files
[PowerPoint] Further updates to low engagement articles (#5471)
1 parent 90964d6 commit 15ecaeb

File tree

2 files changed

+29
-21
lines changed

2 files changed

+29
-21
lines changed

docs/powerpoint/insert-slides-into-presentation.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Insert slides from another PowerPoint presentation
33
description: Learn how to insert slides from one presentation into another.
4-
ms.date: 11/07/2025
4+
ms.date: 11/10/2025
55
ms.localizationpriority: medium
66
---
77

@@ -81,21 +81,19 @@ async function insertAllSlides() {
8181
}
8282
```
8383

84-
You can control some aspects of the insertion result, including where the slides are inserted and whether they get the source or target formatting , by passing an [InsertSlideOptions](/javascript/api/powerpoint/powerpoint.insertslideoptions) object as a second parameter to `insertSlidesFromBase64`. The following is an example. About this code, note:
84+
You can control some aspects of the insertion result, including where the slides are inserted and whether they get the source or target formatting, by passing an [InsertSlideOptions](/javascript/api/powerpoint/powerpoint.insertslideoptions) object as a second parameter to `insertSlidesFromBase64`. The following is an example. About this code, note:
8585

86-
- There are two possible values for the `formatting` property: "UseDestinationTheme" and "KeepSourceFormatting". Optionally, you can use the `InsertSlideFormatting` enum, (e.g., `PowerPoint.InsertSlideFormatting.useDestinationTheme`).
86+
- There are two possible values for the `formatting` property: "UseDestinationTheme" and "KeepSourceFormatting". Optionally, you can use the `InsertSlideFormatting` enum (e.g., `PowerPoint.InsertSlideFormatting.useDestinationTheme`).
8787
- The function will insert the slides from the source presentation immediately after the slide specified by the `targetSlideId` property. The value of this property is a string of one of three possible forms: ***nnn*#**, **#*mmmmmmmmm***, or ***nnn*#*mmmmmmmmm***, where *nnn* is the slide's ID (typically 3 digits) and *mmmmmmmmm* is the slide's creation ID (typically 9 digits). Some examples are `267#763315295`, `267#`, and `#763315295`.
8888

8989
```javascript
9090
async function insertSlidesDestinationFormatting() {
9191
await PowerPoint.run(async function(context) {
92-
context.presentation
93-
.insertSlidesFromBase64(chosenFileBase64,
94-
{
92+
const insertSlideOptions: PowerPoint.InsertSlideOptions = {
9593
formatting: "UseDestinationTheme",
9694
targetSlideId: "267#"
97-
}
98-
);
95+
};
96+
context.presentation.insertSlidesFromBase64(chosenFileBase64, insertSlideOptions);
9997
await context.sync();
10098
});
10199
}
@@ -132,11 +130,12 @@ Of course, you typically won't know at coding time the ID or creation ID of the
132130
await PowerPoint.run(async function(context) {
133131

134132
const selectedSlideID = await getSelectedSlideID();
135-
136-
context.presentation.insertSlidesFromBase64(chosenFileBase64, {
133+
const insertSlideOptions: PowerPoint.InsertSlideOptions = {
137134
formatting: "UseDestinationTheme",
138135
targetSlideId: selectedSlideID + "#"
139-
});
136+
};
137+
138+
context.presentation.insertSlidesFromBase64(chosenFileBase64, insertSlideOptions);
140139

141140
await context.sync();
142141
});
@@ -151,11 +150,12 @@ You can also use the [InsertSlideOptions](/javascript/api/powerpoint/powerpoint.
151150
async function insertAfterSelectedSlide() {
152151
await PowerPoint.run(async function(context) {
153152
const selectedSlideID = await getSelectedSlideID();
154-
context.presentation.insertSlidesFromBase64(chosenFileBase64, {
153+
const insertSlideOptions: PowerPoint.InsertSlideOptions = {
155154
formatting: "UseDestinationTheme",
156155
targetSlideId: selectedSlideID + "#",
157156
sourceSlideIds: ["267#763315295", "256#", "#926310875", "1270#"]
158-
});
157+
};
158+
context.presentation.insertSlidesFromBase64(chosenFileBase64, insertSlideOptions);
159159
160160
await context.sync();
161161
});
@@ -168,3 +168,11 @@ async function insertAfterSelectedSlide() {
168168
There's no practical way that users can discover the ID or creation ID of a slide in the source presentation. For this reason, you can really only use the `sourceSlideIds` property when either you know the source IDs at coding time or your add-in can retrieve them at runtime from some data source. Because users cannot be expected to memorize slide IDs, you also need a way to enable the user to select slides, perhaps by title or by an image, and then correlate each title or image with the slide's ID.
169169
170170
Accordingly, the `sourceSlideIds` property is primarily used in presentation template scenarios: The add-in is designed to work with a specific set of presentations that serve as pools of slides that can be inserted. In such a scenario, either you or the customer must create and maintain a data source that correlates a selection criterion (such as titles or images) with slide IDs or slide creation IDs that has been constructed from the set of possible source presentations.
171+
172+
## Try it out
173+
174+
Try the following interactive sample using the [Script Lab add-in](https://appsource.microsoft.com/product/office/WA104380862).
175+
176+
- Insert slides from other presentation
177+
178+
To learn more about Script Lab, see [Explore Office JavaScript API using Script Lab](../overview/explore-with-script-lab.md).

docs/powerpoint/use-document-themes-in-your-powerpoint-add-ins.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: Use Office document themes in your PowerPoint add-ins
33
description: Learn how to visually coordinate themes, such as fonts and colors, to apply to PowerPoint presentations.
4-
ms.date: 11/07/2025
4+
ms.date: 11/10/2025
55
ms.localizationpriority: medium
66
---
77

88
# Use Office document themes in your PowerPoint add-ins
99

10-
An [Office theme](https://support.microsoft.com/office/83e68627-2c17-454a-9fd8-62deb81951a6) consists, in part, of a visually coordinated set of fonts and colors that you can apply to presentations, documents, worksheets, and emails. To apply or customize the theme of a presentation in PowerPoint, you use the **Themes** and **Variants** groups on **Design** tab of the ribbon. PowerPoint assigns a new blank presentation with the default **Office Theme**, but you can choose other themes available on the **Design** tab, download additional themes from Office.com, or create and customize your own theme.
10+
An [Office theme](https://support.microsoft.com/office/83e68627-2c17-454a-9fd8-62deb81951a6) consists, in part, of a visually coordinated set of fonts and colors that you can apply to presentations, documents, worksheets, and emails. To apply or customize the theme of a presentation in PowerPoint, use the **Themes** and **Variants** groups on **Design** tab of the ribbon. PowerPoint assigns a new blank presentation with the default **Office Theme**, but you can choose other themes available on the **Design** tab, download additional themes from Office.com, or create and customize your own theme.
1111

1212
Using **OfficeThemes.css**, design add-ins that are coordinated with PowerPoint in two ways.
1313

@@ -21,19 +21,19 @@ Every Office document theme defines 12 colors. Ten of these colors are available
2121

2222
![Color palette.](../images/office15-app-color-palette.png)
2323

24-
To view or customize the full set of 12 theme colors in PowerPoint, in the **Variants** group on the **Design** tab, click the **More** dropdown list then select **Colors** > **Customize Colors** to display the **Create New Theme Colors** dialog box.
24+
To view or customize the full set of 12 theme colors in PowerPoint, in the **Variants** group on the **Design** tab, expand the **More** dropdown list then select **Colors** > **Customize Colors** to display the **Create New Theme Colors** dialog box.
2525

2626
![Create new theme colors dialog box.](../images/office15-app-create-new-theme-colors.png)
2727

2828
The first four colors are for text and backgrounds. Text that is created with the light colors will always be legible over the dark colors, and text that is created with dark colors will always be legible over the light colors. The next six are accent colors that are always visible over the four potential background colors. The last two colors are for hyperlinks and followed hyperlinks.
2929

3030
## Document theme fonts
3131

32-
Every Office document theme also defines two fonts -- one for headings and one for body text. PowerPoint uses these fonts to construct automatic text styles. In addition, **Quick Styles** galleries for text and **WordArt** use these same theme fonts. These two fonts are available as the first two selections when you select fonts with the font picker.
32+
Every Office document theme also defines two fonts: one for headings and one for body text. PowerPoint uses these fonts to construct automatic text styles. In addition, **Quick Styles** galleries for text and **WordArt** use these same theme fonts. These two fonts are available as the first two selections when you select fonts with the font picker.
3333

3434
![The font picker.](../images/office15-app-font-picker.png)
3535

36-
To view or customize theme fonts in PowerPoint, in the **Variants** group on the **Design** tab, click the **More** dropdown list then select **Fonts** > **Customize Fonts** to display the **Create New Theme Fonts** dialog box.
36+
To view or customize theme fonts in PowerPoint, in the **Variants** group on the **Design** tab, expand the **More** dropdown list then select **Fonts** > **Customize Fonts** to display the **Create New Theme Fonts** dialog box.
3737

3838
![Create new theme fonts dialog box.](../images/office15-app-create-new-theme-fonts.png)
3939

@@ -54,7 +54,7 @@ Using the **OfficeThemes.css** file with your content add-ins for PowerPoint let
5454
Use the following steps to add and reference the **OfficeThemes.css** file to your add-in project.
5555

5656
> [!NOTE]
57-
> The steps in this procedure only apply to Visual Studio 2015. If you're using Visual Studio 2019, the **OfficeThemes.css** file is created automatically for any new PowerPoint add-in projects that you create.
57+
> If you're using Visual Studio 2019 or later, the **OfficeThemes.css** file is created automatically for any new PowerPoint add-in projects that you create.
5858
5959
1. In **Solution Explorer**, right-click (or select and hold) the **Content** folder in the _**project_name**_**Web** project, choose **Add**, and then select **Style Sheet**.
6060

@@ -225,11 +225,11 @@ The **OfficeThemes.css** file provides classes that correspond to the 2 fonts an
225225
|Class|Description|
226226
|:-----|:-----|
227227
| `office-bodyFont-eastAsian`|East Asian name of the body font.|
228-
| `office-bodyFont-latin`|Latin name of the body font. Default "Calabri"|
228+
| `office-bodyFont-latin`|Latin name of the body font. Default "Calibri"|
229229
| `office-bodyFont-script`|Script name of the body font.|
230230
| `office-bodyFont-localized`|Localized name of the body font. Specifies the default font name according to the culture currently used in Office.|
231231
| `office-headerFont-eastAsian`|East Asian name of the headers font.|
232-
| `office-headerFont-latin`|Latin name of the headers font. Default "Calabri Light"|
232+
| `office-headerFont-latin`|Latin name of the headers font. Default "Calibri Light"|
233233
| `office-headerFont-script`|Script name of the headers font.|
234234
| `office-headerFont-localized`|Localized name of the headers font. Specifies the default font name according to the culture currently used in Office.|
235235

0 commit comments

Comments
 (0)