# 07. PowerPoint

## Microsoft PowerPoint <a href="#microsoft-powerpoint" id="microsoft-powerpoint"></a>

Microsoft PowerPoint is a presentation program developed by Microsoft.

This covers how to load a Microsoft PowerPoint document into a document format that can be used downstream.

Please refer to the official documentation for detailed Unstructured setup instructions.

```
# Installing the package
# !pip install -qU unstructured python-pptx
```

```
from langchain_community.document_loaders import UnstructuredPowerPointLoader

# UnstructuredPowerPointLoader generation
loader = UnstructuredPowerPointLoader("./data/sample-ppt.pptx")

# load data
docs = loader.load()

# Output the number of loaded documents
print(len(docs))
```

```
1
```

```
Unstructured is a variety of texts chunks about various "elements" creates.

Basically combined into one document But it returns, mode="elements"You can easily separate elements by specifying.
```

```
# UnstructuredPowerPointLoader generation
loader = UnstructuredPowerPointLoader("./data/sample-ppt.pptx", mode="elements")

# load data
docs = loader.load()

print(len(docs))
```

```
17
```

```
print(docs[0].page_content)
```

```
Langchain Korean Tutorial
```

```
docs[0].metadata
```

```
{'source': './data/sample-ppt.pptx', 'filename': 'sample-ppt.pptx', 'file_directory': './data', 'last_modified': '2024-07-30T03:11:38', 'filetype': 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'page_number': 1, 'category': 'Title'}
```
