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 .NET and Aspose.Words for .NET.

As a standalone API, Aspose.Slides for .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

  1. Add these namespaces to your program.cs file:

    using System;
    using System.Drawing.Imaging;
    using System.IO;
    using Aspose.Slides;
    using Aspose.Words;
    using SkiaSharp;
  2. Use this code snippet to convert the PowerPoint to Word:

    using var presentation = new Presentation();
    var doc = new Document();
    var builder = new DocumentBuilder(doc);
    foreach (var slide in presentation.Slides)
       // generates and inserts slide image
       using var bitmap = slide.GetThumbnail(1, 1);
       using var stream = new MemoryStream();
       bitmap.Save(stream, ImageFormat.Png);
       stream.Seek(0, SeekOrigin.Begin);
       using var skBitmap = SKBitmap.Decode(stream);
       // inserts slide's texts
       foreach (var shape in slide.Shapes)
          if (shape is AutoShape autoShape)