Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/Excel.Areas.Item.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ms.localizationpriority: medium

# Areas.Item property (Excel)

Returns a single object from a collection.
Returns a single **[Range](Excel.Range.md)** object from the collection.


## Syntax
Expand Down
57 changes: 57 additions & 0 deletions api/PowerPoint.Slides.Add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Slides.Add method (PowerPoint)
api_name:
- PowerPoint.Slides.Add
---


# Slides.Add method (PowerPoint)

Creates a new slide, adds it to the **[Slides](PowerPoint.Slides.md)** collection, and returns the slide.

## Syntax

_expression_. `AddSlide`( `_Index_`, `_Layout_` )

_expression_ An expression that returns a [Slides](PowerPoint.Slides.md) object.

## Parameters


|Name|Required/Optional|Data type|Description|
|:-----|:-----|:-----|:-----|
| _Index_|Required|**Int**|The index of the slide to be added.|
| _Layout_|Required|**PpSlideLayout**|The layout of the slide.|

## Return value

Slide

## Example

The following example shows how to use the **Add** method to add a new slide to the **Slides** collection. It adds a new slide in index position 1 with the blank layout.

```vb
Public Sub Add_Example()

Dim pptSlide As Slide
Set pptSlide = ActivePresentation.Slides.AddSlide(1, ppLayoutBlank)

End Sub
```

## Remarks

See [PpSlideLayout enumeration](PowerPoint.PpSlideLayout.md) for all available layouts. For custom slide layouts, use [Slides.AddSlide](PowerPoint.Slides.AddSlide.md) instead.

This method is hidden from the VBA Object Browser, but is still available to use.

If your Visual Studio solution includes the **Microsoft.Office.Interop.PowerPoint** reference, this method maps to the following type:

- **Microsoft.Office.Interop.PowerPoint.Slides.Add(int, Microsoft.Office.Interop.PowerPoint.PpSlideLayout)**

## See also

[Slides Object](PowerPoint.Slides.md)

[!include[Support and feedback](~/includes/feedback-boilerplate.md)]
6 changes: 1 addition & 5 deletions api/PowerPoint.Slides.AddSlide.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@ End Sub

## Remarks

If your Visual Studio solution includes the **Microsoft.Office.Interop.PowerPoint** reference, this method maps to the following types:
If your Visual Studio solution includes the **Microsoft.Office.Interop.PowerPoint** reference, this method maps to the following type:


- **Microsoft.Office.Interop.PowerPoint.Slides.Add(int, Microsoft.Office.Interop.PowerPoint.PpSlideLayout)**

- **Microsoft.Office.Interop.PowerPoint.Slides.AddSlide(int, Microsoft.Office.Interop.PowerPoint.CustomLayout)**


## See also

Expand Down
2 changes: 1 addition & 1 deletion api/PowerPoint.Slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The following examples describe how to:

## Example

Use the [Slides](PowerPoint.Presentation.Slides.md) property to return a **Slides** collection. Use the [Add](PowerPoint.Presentations.Add.md) method to create a new slide and add it to the collection. The following example adds a new slide to the active presentation.
Use the [Slides](PowerPoint.Presentation.Slides.md) property to return a **Slides** collection. Use the [Add](PowerPoint.Slides.Add.md) method to create a new slide and add it to the collection. The following example adds a new slide to the active presentation.


```vb
Expand Down