Convert PowerPoint to Word

If you plan to use textual content or information from a presentation (PPT or PPTX) in new ways, you may benefit from converting the presentation to Word (DOC or DOCX).

  • When compared to Microsoft PowerPoint, the Microsoft Word app is more equipped with tools or functionalities for content.
  • Besides the editing functions in Word, you may also benefit from enhanced collaboration, printing, and sharing features.

Aspose.Slides and Aspose.Words

To convert a PowerPoint file (PPTX or PPT) to Word (DOCX or DOCX), you need both Aspose.Slides for Python via .NET and Aspose.Words for Python via .NET.

As a standalone API, Aspose.Slides for Python via .NET provides functions that allow you to extract texts from presentations.

Aspose.Words is an advanced document processing API that allows applications to generate, modify, convert, render, print files, and perform other tasks with documents without utilizing Microsoft Word.

Convert PowerPoint to Word in Python

  1. Add these namespaces to your file:
import aspose.slides as slides
import aspose.words as words
  1. Use this code snippet to convert the PowerPoint to Word:
presentation = slides.Presentation("pres.pptx")
doc = words.Document()
builder = words.DocumentBuilder(doc)

for index in range(presentation.slides.length):
    slide = presentation.slides[index]
    # generates and inserts slide image
    slide.get_thumbnail(2,2).save("slide_{i}.png".format(i = index), drawing.imaging.ImageFormat.png)
    builder.insert_image("slide_{i}.png".format(i = index))
    for shape in slide.shapes:
        # inserts slide's texts
        if (type(shape) is slides.AutoShape):